Re: xcode XML parser for iPhone app
Re: xcode XML parser for iPhone app
- Subject: Re: xcode XML parser for iPhone app
- From: Jens Alfke <email@hidden>
- Date: Wed, 3 Mar 2010 08:34:46 -0800
On Mar 3, 2010, at 7:13 AM, Jeff Kelley wrote:
> On Mar 3, 2010, at 1:53 AM, Jens Alfke wrote:
>
>> Unfortunately Cocoa's NSXML API isn't available on iPhone, so you'll need to drop down to the lower-level libxml2 (which is very flexible but hardly simple, unfortunately.)
>>
>> —Jens
>
> I use NSXMLParser on the iPhone with no problems.
Sorry for the terminology confusion. The term "NSXML" was used for the DOM-based API (NSXMLDocument et al) when it was added in 10.4(?). So for historical reasons I still don't think of it as including NSXMLParser (the SAX API) even though it matches the same string prefix.
You can definitely parse XML with NSXMLParser. Since it's an event-based (SAX) API it's a bit more difficult to do than just accessing the DOM tree. And it doesn't support the super-convenient XPath syntax. But on the plus side, on very large documents it can be faster and use less memory.
—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden