Skip navigation.
 
mlRe: NSData text representation
FROM : Andreas Monitzer
DATE : Thu Jun 19 22:15:05 2008

On Jun 19, 2008, at 20:50, Trygve Inda wrote:

> In my plist (xml1 format) I see something like:
>
> <data>
> +/YgByAMQo78MBADoA
> </data>
>
> However when I send a [myNSData description] I get something like:
>
> <47050000 78da8d53 cb4ac340 146d1ea0 a0b8f133 5c09>
>
> How can I get something more like the first example that I can copy/
> paste
> into a plist?


NSData uses base64 encoding for the XML representation. However, you 
shouldn't rely on this.

This function should do what you need:
CFDataRef CFPropertyListCreateXMLData(CFAllocatorRef allocator, 
CFPropertyListRef propertyList);

passing the NSData object as the propertyList parameter.

andy

Related mailsAuthorDate
mlNSData text representation Trygve Inda Jun 19, 20:50
mlRe: NSData text representation Charles Steinman Jun 19, 21:18
mlRe: NSData text representation Andreas Monitzer Jun 19, 22:15
mlRe: NSData text representation Adam Leonard Jun 19, 23:46