Re: NSXMLNode and NSXMLElement

2009-01-20 Thread ajb . lists
On Jan 20, 2009, at 10:33 PM, Martijn van Exel wrote: Hi all, Consider this small bit of (OpenStreetMap) XML: user='mvexel' osmxapi:users='mvexel' timestamp='2008-12-11T13:11:41Z'> I got this (and its peers) in an array of NSXMLNodes using the nodesForXP

NSXMLNode and NSXMLElement

2009-01-20 Thread Martijn van Exel
Hi all, Consider this small bit of (OpenStreetMap) XML: 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

Re: NSXMLNode and NSXMLElement issue

2008-08-29 Thread Andrew R. Kinnie
Thanks, I have no idea how I missed that. Exactly what I was looking for! Andrew On Aug 28, 2008, at 9:40 PM, Graff wrote: On Aug 28, 2008, at 3:11 PM, Andrew R. Kinnie wrote: I am attempting to programmatically create an html (rather, xhtml) document using NSXMLDocument, NSXMLElement, etc

Re: NSXMLNode and NSXMLElement issue

2008-08-28 Thread Graff
On Aug 28, 2008, at 3:11 PM, Andrew R. Kinnie wrote: I am attempting to programmatically create an html (rather, xhtml) document using NSXMLDocument, NSXMLElement, etc. I am able to create the document and it works, but I am not sure how to create text which is not inside a paragraph or ano

Re: NSXMLNode and NSXMLElement issue

2008-08-28 Thread Nate Weaver
You need to use NSXMLNode itself, and not NSXMLElement (since text nodes aren't elements). [NSXMLNode textWithStringValue:someString] or - [[NSXMLNode alloc] initWithKind:NSXMLTextKind], followed by - setStringValue:. Then just addChild: or insertChild:atIndex: with your new text node as norm

NSXMLNode and NSXMLElement issue

2008-08-28 Thread Andrew R. Kinnie
Greetings: I am attempting to programmatically create an html (rather, xhtml) document using NSXMLDocument, NSXMLElement, etc. I am able to create the document and it works, but I am not sure how to create text which is not inside a paragraph or another tag which can be a node. e.g. co