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 (Cocoa-dev@lists.apple.com)

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/bianface%40gmail.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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