views:

335

answers:

2

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!

+5  A: 

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.

drewh
A: 

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!)

lostInTransit
That's a good example, been there done that. But my intent is to discover additional XML libraries available. Thanks anyway!
John Fricker
Came across this on one of the posts - Jim Dovey's written his own xml parser (http://stackoverflow.com/questions/826281/better-performance-with-libxml2-or-nsxmlparser-on-the-iphone/842549#842549)
lostInTransit