Re: CoreData XML error while saving
Re: CoreData XML error while saving
- Subject: Re: CoreData XML error while saving
- From: Greg Herlihy <email@hidden>
- Date: Wed, 12 Oct 2005 07:25:13 -0700
- Thread-topic: CoreData XML error while saving
On 10/12/05 4:00 AM, "Bruno Blondeau" <email@hidden> wrote:
>
> On 12 oct. 05, at 06:19, email@hidden wrote:
>
>> On Oct 11, 2005, at 10:28 AM, Bruno Blondeau wrote:
>>
>>>>
>>>>
>>>>> How am I supposed to use this method (willPresentError)?
>>>>>
>>>>
>>>> <http://developer.apple.com/cgi-bin/search.pl?
>>>> q=willPresentError:&site=default_collection>
>>>>
>>>
>>> Unfortunately, this was the way I was using it, and my error still
>>> appears (it's probably only a console error, not one related
>>> directly to CoreData), and I still don't know why it is means...
>>> and I still don't know why my application is working fine with
>>> Binary & SQL, but not with XML... Any other idea?
>>>
>>>
>> What are you actually trying to achieve?
>>
>
> Just saving a document.
>
> It is a rather simple NSPersistentDocument&Coredata-based application.
>
> There may be a bug in my application, but the error message isn't
> helping me to trace it. And there is no information available about
> this error message, which doesn't seem related directly to CoreData,
> but maybe to NSXML or anything else that CoreData may be using to
> "xml-ize" the objects.
I believe there is a bug in Core Data's XML character escaping logic. I
found that storing large numbers of HTML documents (which require extensive
character escaping) as String data types invariably rendered the database's
XML invalid. And an invalid XML document must be rejected in its entirety.
The application does not have the option of trying to work with a badly
formed XML document.
As a workaround, I stored the HMTL content as binary data. Binary data is
base 64 encoded and as such, its characters never need to be escaped.
Greg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden