Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jashsayani

macrumors 6502
Original poster
Feb 7, 2009
299
130
Redwood City, CA
I want to make a Cocoa app that displays selected information from a Cocoa file.

For example, the XML file has the foll:
Key-Data1 (Value - 1)
Key-Data2 (Value - 2)
Key-Data3 (Value - 3)

I want it to read the file and display the value of the specified key.

How do I do it ?
 

jashsayani

macrumors 6502
Original poster
Feb 7, 2009
299
130
Redwood City, CA
Hi,

I would start with by looking at chapter 28 of Aarons book. Thats an example of using NSXMLDocument to parse information.

Best regards
Peter

Thanks. But I don't have that book and amazon is not available in my country.
Could you help me with the link to the Apple documentation or online examples. Thanks.
 

eddietr

macrumors 6502a
Oct 29, 2006
807
0
Virginia
In the Apple docs you could read Tree-Based XML Programming Guide for Cocoa.

(Or if you prefer/need a SAX style event driven model there is also Event-Driven XML Programming Guide for Cocoa)
 

jashsayani

macrumors 6502
Original poster
Feb 7, 2009
299
130
Redwood City, CA
In the Apple docs you could read Tree-Based XML Programming Guide for Cocoa.

(Or if you prefer/need a SAX style event driven model there is also Event-Driven XML Programming Guide for Cocoa)

Thanks man, that helped.

If possible, could you also post the link to the sample code on Apple site for XML reading app.

Thanks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.