Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: xcode XML parser for iPhone app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xcode XML parser for iPhone app



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

References: 
 >xcode XML parser for iPhone app (From: "Rufat A. Abdullayev" <email@hidden>)
 >Re: xcode XML parser for iPhone app (From: Jens Alfke <email@hidden>)
 >Re: xcode XML parser for iPhone app (From: Jeff Kelley <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.