• 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: NSXMLParser parses line feeds in attribute strings as spaces
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSXMLParser parses line feeds in attribute strings as spaces


  • Subject: Re: NSXMLParser parses line feeds in attribute strings as spaces
  • From: Jeff Johnson <email@hidden>
  • Date: Thu, 8 Jul 2010 21:18:17 -0500

No, I don't believe that this is a bug. See section 3.3.3 Attribute-Value Normalization:

http://www.xml.com/axml/testaxml.htm

-Jeff


On Jul 8, 2010, at 9:04 PM, Jerry Krinock wrote:

> Consider this XML:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <foos>
>  <foo location="San José,
>  California" />
> </foos>
>
> wherein there is a linefeed (0x0a) followed by two spaces between the command and "California".  The accented é is represented by two bytes, 0xa3 0xc9.  It's all nice UTF-8, as indicated in the header.
>
> When I parse this using NSXMLParser, the value for the key "location" in the attributes dictionary comes out as:
>
> San José,   California
>
> wherein there are three spaces (0x20) between the comma and "California".
>
> The accented é gets parsed correctly, as UTF8, but the linefeed 0x0a gets changed to a space.  Is this a bug?

_______________________________________________

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: NSXMLParser parses line feeds in attribute strings as spaces
      • From: Jerry Krinock <email@hidden>
    • Re: NSXMLParser parses line feeds in attribute strings as spaces
      • From: John Joyce <email@hidden>
References: 
 >NSXMLParser parses line feeds in attribute strings as spaces (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: NSXMLParser parses line feeds in attribute strings as spaces
  • Next by Date: Re: Another basic CoreData question
  • Previous by thread: Re: NSXMLParser parses line feeds in attribute strings as spaces
  • Next by thread: Re: NSXMLParser parses line feeds in attribute strings as spaces
  • Index(es):
    • Date
    • Thread