John Fricker
John Fricker

Reputation: 3344

What are some options for XML on the iPhone?

I have implemented NSXMLParser in my app and I am reviewing alternatives. My complaints about NSXMLParser are that it's convoluted to implement for simple files, and it's not the zippiest thing around either.

So far I've identified:

Any others?

And what's your experience with these?

Thanks for your input!

Upvotes: 3

Views: 487

Answers (2)

lostInTransit
lostInTransit

Reputation: 71047

There is a very good example in the developer portal called XMLPerformance. It tells you how to parse xml files effectively using both libxml2 and NSXMLParser.

I am using it in one of my apps and the thing works great. I have some 600 items in my XML but the view hardly takes 1 sec to load using the methods provided in the example (without consuming much memory!)

Upvotes: 0

drewh
drewh

Reputation: 10167

We use libxml2 in our app, specifically the xmlTextReader API. It's a stream reader, which allows for much simpler code than a SAX reader (no callbacks, etc.) and doesn't put the whole document tree in memory like a DOM reader.

Upvotes: 5

Related Questions