Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quick way to convert hex string represented in ASCII to binary?




Am 29.07.2006 um 09:20 Uhr schrieb Ken Tozier:

and then getting a description of these objects for storage.

'-description' is *not* meant for storage!

Try NSPropertyListSerialization instead.
This should give you an XML representation of your inputData object:

NSData *xmlData = [NSPropertyListSerialization dataFromPropertyList:inputData format:NSPropertyListXMLFormat_v1_0 errorDescription:NULL];

To get the data back:

NSData *outputData = [NSPropertyListSerialization propertyListFromData:xmlData mutabilityOption:NSPropertyListImmutable format:NSPropertyListXMLFormat_v1_0 errorDescription:NULL];


(Code untested; written in Mail)


Andreas _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Quick way to convert hex string represented in ASCII to binary? (From: Ken Tozier <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.