Re: NSXMLElement -stringValue and whitepsace
Re: NSXMLElement -stringValue and whitepsace
- Subject: Re: NSXMLElement -stringValue and whitepsace
- From: Rob Keniger <email@hidden>
- Date: Mon, 24 Nov 2008 12:09:12 +1000
On 24/11/2008, at 8:02 AM, Keith Blount wrote:
Hi,
Apologies in advance, as I believe this may be a very basic
question, but I've only recently started using the Cocoa XML
classes. I'm using NSXMLDocument, NSXMLNode and NSXMLElement to read
and write OPML files. Everything works fine except for one thing - I
can't seem to find a way of preserving whitespace inside the element
attribute stringValues. I've searched the docs and Googled around
for anything on whitespace or newlines and the various NSXML...
classes as I figured this would be fairly trivial, but I must be
using the wrong search terms because I can't find an obvious solution.
When you create the NSXMLDocument, by doing -
initWithXMLString:options:error: or the equivalent method that takes
NSData, are you using the NSXMLNodePreserveWhitespace option?
Most of the input/output mask options for NSXMLDocument are in the
NSXMLNode documentation, as NSXMLDocument is a subclass of NSXMLNode.
--
Rob Keniger
_______________________________________________
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