Creating CDATA NSXMLElement
Creating CDATA NSXMLElement
- Subject: Creating CDATA NSXMLElement
- From: Adam Radestock <email@hidden>
- Date: Thu, 20 Sep 2007 12:51:52 +0100
Hi everyone,
After reading and re-reading the NSXML documentation from Apple, I
still am unsure on the correct way to create a CDATA NSXMLElement.
I want to place some HTML code and/or a link within a CDATA wrapper
in the string value of an NSXMLElement - like this:
<description><![CDATA[blah]]></description>
I currently have:
[item addChild:[NSXMLNode elementWithName:@"description" stringValue:
[NSString stringWithFormat:@"<![CDATA[%@]]>", [[itemDictionary
objectForKey:@"releaseNotes"] absoluteString]]]];
- 'item' being an NSXMLElement.
But when I save this out as XML, it comes out as:
<description><![CDATA[blah]]></description>
Can anyone suggest a solution?
Thanks in advance,
Adam Radestock
Glass Monkey Software
www.glassmonkey.co.uk
_______________________________________________
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