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:rsh...@instantinteractive.com
Instant Interactive(tm)   http://www.instantinteractive.com



_______________________________________________

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 arch...@mail-archive.com

Reply via email to