  | |  | Working with XML files/CFURL | Working with XML files/CFURL 2003-11-22 - By Bryan Pietrzak
Back On Nov 21, 2003, at 2:36 AM, m.b. wrote:
> The doc's suggest I use CFURLCreateDataAndPropertiesFromResource to > load the xml doc into memory to begin working with it
And just to follow-up, yes, this is what I do (error checking strippped) once I have the CFURL as I posted in the other e-mail...
CFDataRef xmlData; CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault, sourceURL, &xmlData, NULL, NULL, NULL); CFXMLTreeRef tree = CFXMLTreeCreateFromData(kCFAllocatorDefault, xmlData, sourceURL, kCFXMLParserSkipWhitespace, kCFXMLNodeCurrentVersion);
if (tree != NULL) { ParseGameSmithXML(tree); CFRelease(tree);
CFRelease(xmlData); }
CFRelease(sourceURL);
Which I think is pretty close to what you posted.
Bryan __ ____ ____ ____ ____ ____ ____ ____ ____ ____ mac-games-dev mailing list | mac-games-dev@(protected) Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/mac -games-dev Do not post admin requests to the list. They will be ignored.
Earn $52 per hosting referral at Lunarpages.
|
|
 |