NSXMLNode and NSXMLElement issue
NSXMLNode and NSXMLElement issue
- Subject: NSXMLNode and NSXMLElement issue
- From: "Andrew R. Kinnie" <email@hidden>
- Date: Thu, 28 Aug 2008 15:11:46 -0400
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.
<body>
<tag>contents</tag>
some random text
</body>
or
<body>
<h3>some header text</h3>
some random text
<ul>
<li> . . . . </li>
etc.
</ul>
</body>
It seems when programmatically creating a node, the node has a name,
which is the tag (e.g. h3 above) but how do you do this without tags?
The text itself, unwrapped by tags would be the node, but I have no
idea how to programmatically do this. I created node with an empty
name, but then the open tag actually is displayed in safari. I tried
a nil name, in which case the entire tag and it's contents is ignored.
Another (and more directly relevant) example is bread crumbs:
<some link text> - <some other link text> - etc.
I was able to otherwise create text using div tags, but if I try divs
here (i.e. wrap the "-" in a div) I get:
<some link text>
-
<some other link text>
Any insight or ideas? What am I missing?
Andrew
_______________________________________________
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