• 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: Carriage returns and NSXMLParser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Carriage returns and NSXMLParser


  • Subject: Re: Carriage returns and NSXMLParser
  • From: Ian Jackson <email@hidden>
  • Date: Wed, 23 Apr 2008 21:04:21 +1200

Whitespace is preserved, not ignored. But in your example, the new line is in the attribute value, so I don't suppose XML cares too much what's between the quotation marks.
So if you can obtain the value of the data attribute, and print the value to the console, does it come out with a space instead of the \n?


Ian.

On 23/04/2008, at 12:16 AM, Brad Peterson wrote:

Hi,

Have there been any recent changes to NSXMLParser with
respect to carriage returns?

I haven't noticed it previously, but I'm suddenly
seeing a lot of cases where carriage returns embedded
in data are returned as spaces by the parser.

That is:
<record	id="429" data="A sample\nrecord" />

Is read in as if it were:
<record	id="429" data="A sample record" />

I know that whitespace is technically ignored in XML,
but I didn't think it was necessarily discarded
either.

Is that the way it's supposed to be? Is there an
option I can set to change that?

Thanks!!


____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
_______________________________________________


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

_______________________________________________

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: Carriage returns and NSXMLParser
      • From: Daniel Staal <email@hidden>
References: 
 >Carriage returns and NSXMLParser (From: Brad Peterson <email@hidden>)

  • Prev by Date: Re: How to retain Previous content view in cocoa
  • Next by Date: Re: Uneditable NSTableView
  • Previous by thread: Carriage returns and NSXMLParser
  • Next by thread: Re: Carriage returns and NSXMLParser
  • Index(es):
    • Date
    • Thread