Re: NSXMLElement -stringValue and whitepsace
Re: NSXMLElement -stringValue and whitepsace
- Subject: Re: NSXMLElement -stringValue and whitepsace
- From: Jeff Johnson <email@hidden>
- Date: Sun, 23 Nov 2008 18:56:32 -0600
On Nov 23, 2008, at 4:42 PM, Keith Blount wrote:
Hi Jeff,
Thanks for the reply.
Keith,
When you say that none of the options you've tried make
a difference, does that include this one?
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSXMLNode_Class/Reference/Reference.html#/
/apple_ref/doc/c_ref/NSXMLNodePreserveWhitespace
Yes, that was one of the first things I tried, in fact:
NSXMLDocument *OPMLDocument = [[NSXMLDocument alloc]
initWithData:xmlData options:NSXMLNodePreserveWhitespace error:NULL];
The whitespace of attribute stringValues still gets squished, though.
Thanks,
Keith
Keith,
It appears that the XML spec requires that attribute values be
normalized:
http://www.xml.com/axml/target.html#AVNormalize
Thus, if you still want the whitespace, you would probably have to
subclass NSXMLNode or NSXMLDocument.
-Jeff
_______________________________________________
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