Re: Saving Bookmark Data to XML File
Re: Saving Bookmark Data to XML File
- Subject: Re: Saving Bookmark Data to XML File
- From: Peter Zegelin <email@hidden>
- Date: Fri, 06 Jan 2012 22:00:31 +1100
Yes, that was it - thank you.
I ended up using GTMStringEncoding from code.google.com
On 06/01/2012, at 6:09 PM, Jens Alfke wrote:
>
> On Jan 5, 2012, at 11:00 PM, Peter Zegelin wrote:
>
>> I am trying to save a bookmark into an xml file but am having difficulty converting the bookmark to and from an NSString.
>
> Are you sure bookmarks are textual? From your trouble I’m guessing that they’re not, the contents are binary. Trying to read this as a string is not going to work.
>
> If you want to store binary data in an XML file, you’ll have to encode it using something like base64. For some reason Apple has never seen fit to include a public base64 codec API in the OS, but there are a number of open-source implementations (it’s only a few pages of code.)
>
> —Jens
>
Peter
_______________________________________________
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