views:

20

answers:

1

hello everyone.In my application am getting an xml file from server and in that i have some attributes for the element.i donno how to read the attributes .The following is my XML file

 <History> 
    <Result ImageId="4507" Description="" Date="10/19/2010 12:49:22 AM" />
    <Result ImageId="4505" Description="" Date="10/18/2010 8:01:28 AM" />
 </History>

so i want to assign ImageId,Description and Date into three variables and i want to save each result into an array. Reading data from that array.Please help me..

+2  A: 

Standard iPhone way

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/XMLParsing/Articles/UsingParser.html

Handling XML Elements and Attributes

another way to parse Using libxml2 for XML parsing and XPath queries in Cocoa

I know there are third party libraries that simplify the process

Aaron Saunders
i have gone through the above things but i did not find any solution for my problem.Can you please explain it for my above XML file
iphoneStruggler
@iphoneStruggler what have you written so far? Post the errors and maybe you will get a response.
Aaron Saunders