-3

For the last few hours I have tired to get my head around using NSXMLParser.

I understand parts of how it works.

WHY Oh WHY! is this so hard? Is there an easy way to do it, like just name the tag and get the contents?

Oh how I miss XmlDocument object from .Net.

Thanks a million.

i_am_jorf
  • 53,608
  • 15
  • 131
  • 222
Morry
  • 121
  • 2
  • 13
  • Do you have a *specific* question? – Georg Fritzsche Jul 13 '10 at 22:07
  • 3
    You should post what you've tried and then maybe we could help you make it work. Are you having issues with the object's interface, or objective-C itself? If you just want to rant, try craigslist. – i_am_jorf Jul 13 '10 at 22:07
  • Question was what other options do I have to parse a kml file. – Morry Jul 13 '10 at 22:36
  • +1 for the "rant" comment. Better to ask a real question here than simply to vaguely bemoan that something is "hard." – Joshua Nozzi Jul 13 '10 at 23:17
  • Sorry about the rant there was a question in there :) which was answered :P – Morry Jul 15 '10 at 00:13
  • Hey Morry, here's a class that provides a one-line method for parsing an XML file: http://troybrant.net/blog/2010/09/simple-xml-to-nsdictionary-converter/ – Troy Brant Sep 19 '10 at 06:33

1 Answers1

2

Why don't you try NSXMLDocument instead? With it you can do the kind of things you want using xpaths. Check out the docs or this sample code : http://developer.apple.com/mac/library/iPad/index.html#samplecode/XMLBrowser/Introduction/Intro.html%23//apple_ref/doc/uid/DTS40008875

Joshua Nozzi
  • 60,946
  • 14
  • 140
  • 135
GorillaPatch
  • 5,007
  • 1
  • 39
  • 56