ashish
ashish

Reputation: 787

XML with Cocoa Touch

I am a new learner at the area of Objective-C. I would like to retrieve data from XML page on the iPhone. Is it possible? It would be more helpful to me if I get an appropriate suggestion or code.

Upvotes: 3

Views: 3110

Answers (5)

Alpinista
Alpinista

Reputation: 3741

Check out the SiesmicXML tute on Apple's iPhone developer site. It uses the XMLParser in a dedicated thread to parse XML in a backgroud process.

JK

Upvotes: 0

Michael Fey
Michael Fey

Reputation: 1239

There was a good episode of cocoaFusion: the other day that covered the ins and outs of XML parsing. Head on over to cocoafusion.net and look for Episode 2: An intro to using web APIs and XML.

The show notes section for that episode has some sample code downloads and links to other sites that contain more information (including some of the links mentioned in the other answers here).

Cheers!

Upvotes: 2

AnthonyLambert
AnthonyLambert

Reputation: 8830

The SDK comes with the NSXMLParser class. Some people prefer to use the libxml2 library as it can be faster and more memory efficient than NSXMLDocument but you may want to wrap it with an Objective C layer as it is a C API. See this example.

Upvotes: 2

Ryan Townshend
Ryan Townshend

Reputation: 2394

A good article that lays out how you can use NSXMLParser to rip through xml.

Parsing XML in Cocoa

Upvotes: 1

Quentin
Quentin

Reputation: 1781

There is also some other libraries: TouchXML, KissXML.

Upvotes: 0

Related Questions