NSFileWrapper with XML document
NSFileWrapper with XML document
- Subject: NSFileWrapper with XML document
- From: Rick Langschultz <email@hidden>
- Date: Sat, 27 Oct 2007 21:49:26 -0500
Hello everyone,
I can't figure out why this is throwing an error:
- (NSFileWrapper *)fileWrapperRepresentationOfType:(NSString *)aType {
NSMutableDictionary *contents = [NSMutableDictionary dictionary];
NSXMLElement *rootElement = (NSXMLElement *)[NSXMLNode
elementWithName:@"document"];
NSXMLDocument *xmlDocument = [[NSXMLDocument alloc]
initWithRootElement:rootElement];
[contents setObject:xmlDocument forKey:[[NSString alloc]
initWithString:@"properties.xml"]];
NSFileWrapper *documentBundle = [[NSFileWrapper alloc]
initDirectoryWithFileWrappers:contents];
return [documentBundle autorelease];
}
The Error:
[Session started at 2007-10-27 21:47:30 -0500.]
2007-10-27 21:47:42.606 ApplicationName[2087] *** -[NSXMLDocument
preferredFilename]: selector not recognized [self = 0x3c9130]
2007-10-27 21:47:42.612 ApplicationName[2087] *** -[NSXMLDocument
preferredFilename]: selector not recognized [self = 0x3c9130]
besides releasing the rootElement and xmlDocument am I doing anything
wrong?
_______________________________________________
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