• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSData text representation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSData text representation


  • Subject: Re: NSData text representation
  • From: Adam Leonard <email@hidden>
  • Date: Thu, 19 Jun 2008 14:46:22 -0700

+[NSPropertyListSerialization dataFromPropertyList:format:errorDescription:] should do what you want too in Cocoa.

Adam Leonard

On Jun 19, 2008, at 1:15 PM, Andreas Monitzer wrote:

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

_______________________________________________

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


_______________________________________________

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


References: 
 >NSData text representation (From: Trygve Inda <email@hidden>)
 >Re: NSData text representation (From: Andreas Monitzer <email@hidden>)

  • Prev by Date: Class Browser and Code Sense not fully working
  • Next by Date: Re: install_name_tool
  • Previous by thread: Re: NSData text representation
  • Next by thread: Time Machine Helpers
  • Index(es):
    • Date
    • Thread