• 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
NSXMLNode and NSXMLElement
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSXMLNode and NSXMLElement


  • Subject: NSXMLNode and NSXMLElement
  • From: "Martijn van Exel" <email@hidden>
  • Date: Tue, 20 Jan 2009 22:33:53 +0100

Hi all,

Consider this small bit of (OpenStreetMap) XML:

         <node id='257441001' lat='52.3506393' lon='4.8889186' user='mvexel'
osmxapi:users='mvexel' timestamp='2008-12-11T13:11:41Z'>
         <tag k='amenity' v='pub'/>
         <tag k='name' v='Lust'/>
         </node>

I got this (and its peers) in an array of NSXMLNodes using the nodesForXPath
method on my NSXMLDocument object.

Now I need to get to the attribute KVPs. It seems that I must get the
individual nodes into NSXMLElement objects and then traverse the array that
the attributes method of NSXMLElement yields. This somehow does not feel
right. Is there a better way, given this bit of XML inside an NSXMLNode, to
deserialize the attribute values in the different nodes?

--
martijn van exel -+- email@hidden -+- http://www.schaaltreinen.nl/
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSXMLNode and NSXMLElement
      • From: email@hidden
  • Prev by Date: Re: NSURLConnection changing the URL
  • Next by Date: Re: Trying to display a simple sheet
  • Previous by thread: Re: Accessing interface elements (iPhone vs Mac)
  • Next by thread: Re: NSXMLNode and NSXMLElement
  • Index(es):
    • Date
    • Thread