Getting started with XML and XMLParser
Getting started with XML and XMLParser
- Subject: Getting started with XML and XMLParser
- From: Kurt Marek <email@hidden>
- Date: Sun, 9 Nov 2003 08:26:03 -0800
I need to parse an XML file and I had previously written a cheesy hack
using a lot of NSScanner code to get through it. Now that XMLParser is
available I would like to use it to clean up my code and make things a
bit easier to read and undoubtedly more efficient.
I read through the class description, but can't quite figure out how to
actually extract the data I am after. The class I wrote previously
would just scan up to the beginning tag and then put the data into a
string until it reached the ending tag. This got a little messy when I
had to pull out repeating elements that were defined by the same set of
beginning and ending tags. I am assuming that this is something the
XMLParser class can do without difficulty.
I have figured out how to get my XML file into the parser, but I can't
see how to actually extract the data from between the tags. Could
someone point me in the right direction?
Thanks,
Kurt
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.