Re: NSKeyedArchiver, XML, and nibs
Re: NSKeyedArchiver, XML, and nibs
- Subject: Re: NSKeyedArchiver, XML, and nibs
- From: Don Briggs <email@hidden>
- Date: Sun, 9 Nov 2003 20:46:44 -0800
Hi, all
The Excelsior framework seems like a good place to start,
but I found trouble when I wanted to use it directly to archive a
general-purpose
graph of objects.
Jim Rankin responded promptly to my e-mail question about archiving a
general graph of objects as XML.
It's a known problem with a solution on the way.
I would very much like to see a good general solution to this problem.
Unfortunately, we do not have available in Cocoa anything comparable to
Apple's XML.framework from WebObjects, now in Java.
(I haven't seen WebObjects for a while, so I don't know if it's still
in there. It used to be...)
It also occurred to me that XML.framework would not suffice for Cocoa
Desktop apps.
It should map well into the NSDocument methods
- (NSData *)dataRepresentationOfType:(NSString *)aType
- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType
I imagine a marshaller with delegation to handle mapping between KVC
keys and XML tags, per document type (aType).
It also needs a well-structured way to provide value transformers for
coercing some types to/from string form,
e.g., { @"true", @"false" } <-> NSNumber<Bool>
per archivable class and also per document type.
I'm thinking a protocol would be appropriate.
And somehow the resulting graph of objects should understand the XPath
syntax. Maybe.
I am way wrong?
Don
On Nov 9, 2003, at 5:48 PM, Scott Anguish wrote:
>
On Nov 9, 2003, at 7:21 PM, Matthew Johnson wrote:
>
>
> I have been working on persistence in an app lately have been
>
> thinking it would be very cool if I could give NSKeyedArchiver an XML
>
> schema to go with my object graph and use that rather than the plist
>
> format. What do others think of this idea?
>
>
Well, it'd be cool.. and it's been done (although not for
>
NSKeyedArchiver)
>
>
Jim Rankin's XML Marshalling framework
>
>
http://homepage.mac.com/jimbokun/MarshallingTest.gz
>
_______________________________________________
>
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.
_______________________________________________
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.