• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Getting started with XML and XMLParser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Getting started with XML and XMLParser
      • From: Roarke Lynch <email@hidden>
    • Re: Getting started with XML and XMLParser
      • From: Michael Rothwell <email@hidden>
  • Prev by Date: Setting title of TableColumn
  • Next by Date: Re: Setting title of TableColumn
  • Previous by thread: Re: Setting title of TableColumn
  • Next by thread: Re: Getting started with XML and XMLParser
  • Index(es):
    • Date
    • Thread