• 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: Core Data reads xml store value @" " as @""
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data reads xml store value @" " as @""


  • Subject: Re: Core Data reads xml store value @" " as @""
  • From: Ricky Sharp <email@hidden>
  • Date: Fri, 20 Feb 2009 18:51:22 -0600


On Feb 20, 2009, at 6:45 PM, Jerry Krinock wrote:

There is an attribute in my Core Data document-based app whose string value can legitimately be a single single utf8 0x20 space character, @" ". (It's a user-selectable delimiter.)

When I save a document with this attribute value, reading the XML store file with BBEdit shows that it is a single space character, like this:

<attribute name="firstname" type="string"> </attribute>


I'd file that as a bug. The XML above, while legal, will most likely always result in a value of <attribute> being an empty string. Whitespace is typically trimmed by XML parsers.

e.g. if you had:

<attribute ...>[NEW LINE]
[TAB][SPACE][NEW_LINE]
</attribute>

You'd typically still get an empty string.

The solution is to wrap the value in a CDATA block. But, I'm not familiar enough with CoreDate to know if that is some setting somewhere or an API call you need to make.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com



_______________________________________________

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: Core Data reads xml store value @" " as @""
      • From: Klaus Backert <email@hidden>
References: 
 >Core Data reads xml store value @" " as @"" (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Core Data reads xml store value @" " as @""
  • Next by Date: Re: who does like Objective-C 2.0 "properties" dot syntax ?
  • Previous by thread: Core Data reads xml store value @" " as @""
  • Next by thread: Re: Core Data reads xml store value @" " as @""
  • Index(es):
    • Date
    • Thread