Re: Saving Bookmark Data to XML File
Re: Saving Bookmark Data to XML File
- Subject: Re: Saving Bookmark Data to XML File
- From: Jens Alfke <email@hidden>
- Date: Thu, 05 Jan 2012 23:09:44 -0800
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
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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