• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSXMLElement -stringValue and whitepsace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSXMLElement -stringValue and whitepsace
      • From: Jeff Johnson <email@hidden>
References: 
 >Re: NSXMLElement -stringValue and whitepsace (From: Keith Blount <email@hidden>)

  • Prev by Date: Re: NSTableView Problems
  • Next by Date: Re: NSXMLElement -stringValue and whitepsace
  • Previous by thread: Re: NSXMLElement -stringValue and whitepsace
  • Next by thread: Re: NSXMLElement -stringValue and whitepsace
  • Index(es):
    • Date
    • Thread