Re: Saving arbitrary types as property list
Re: Saving arbitrary types as property list
- Subject: Re: Saving arbitrary types as property list
- From: Marcel Weiher <email@hidden>
- Date: Fri, 8 Mar 2002 13:31:20 +0100
On Friday, March 8, 2002, at 09:53 AM, Fraser Speirs wrote:
Hi,
Is it possible to implement some protocol on my own objects such that I
can perform writeToFile:atomically: on an NSArray of them and have it
stored in an xml property list?
Does it have to be an XML property list? If another XML format is
acceptable, the MPWXmlKit includes an XML NSArchiver/NSUnarchiver pair,
which means you just have to implement the NSCoding protocol.
Apart from being easy-to-use, the MPWXmlKit also is fairly good at
dealing with large NSDatas. These are kept as binary and encoded as
CDATA sections instead of converting to an ASCII representation. The
code to read in those CDATA sections is also fairly speedy. There is
also a subclass that will keep the NSDatas completely separately, for
storing in a directory wrapper. This is nice because it keeps the XML
more easily vi-hackable ;-)
Marcel
--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.