NSXMLNode and NSXMLElement
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