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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to