28@implementation NSDictionary (OOXMLExtensions)
30- (BOOL) writeOOXMLToFile:(NSString *)path atomically:(BOOL)flag errorDescription:(NSString **)outErrorDesc
33 NSString *errorDesc =
nil;
35 data = [NSPropertyListSerialization dataFromPropertyList:self format:NSPropertyListXMLFormat_v1_0 errorDescription:outErrorDesc];
38 if (outErrorDesc != NULL)
40 *outErrorDesc = [NSString stringWithFormat:@"could not convert property list to XML: %@", errorDesc];
42#if OOLITE_RELEASE_PLIST_ERROR_STRINGS
48 if (![data writeToFile:path atomically:YES])
50 if (outErrorDesc != NULL)
52 *outErrorDesc = [NSString stringWithFormat:@"could not write data to %@.", path];