Re: XML parser for objective C
Re: XML parser for objective C
- Subject: Re: XML parser for objective C
- From: Niko Matsakis <email@hidden>
- Date: Fri, 30 Sep 2005 12:03:09 +0200
I've just got my hands on objective C and cocoa and at the moment,
I was
given task to parse some XML files using the objective C project I am
developing to get some attribute from the XML. I was given a folder
of XML
parser library written in C, but I am not sure how to use that to
parse the
XML files. Is there any sample code out there which I can refer to
so that I
can have better idea of how to parse XML files from my objective C
class?
Thanks a lot.
Apple's options are:
1. The CF xml parser:
http://developer.apple.com/documentation/CoreFoundation/Conceptual/
CFXML/index.html
2. The tree based Cocoa parser (10.4 only):
http://developer.apple.com/documentation/Cocoa/Conceptual/
NSXML_Concepts/NSXML.html
Another alternative is expat, a well known C based XML parser; there
are objective-C bindings here (http://unix.freshmeat.net/projects/
expatobjc/).
In my own projects I used the expats bindings because I was familiar
with it. When I last looked at it, the CF XML parser had somewhat
underwhelming support of XML (no namespaces, for example) and (what I
found to be) an unintuitive API. I haven't used the tree based
parser yet, it may be better.
Were I to start a new project using XML, I would look first at
apple's tree based parser, then if that were not suitable use expat.
Niko
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden