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