  | |  | Working with XML files/CFURL | Working with XML files/CFURL 2003-11-21 - By m.b.
Back Hello all,
I've been watching the list for around a month now, trying pick up a few things (mostly trying to figure out what I should be paying attention to as I learn how to do some of this stuff.)
This is my first question, and I hope its reasonable for this discussion.
I'm working on parsing data out of an XML document.
However, i'm stuck with part of the Core Foundation High-Level Parser. Specifically the very beginning of the whole thing, loading it into memory.
The doc's suggest I use CFURLCreateDataAndPropertiesFromResource to load the xml doc into memory to begin working with it. Well, digging around I found that it might be easiest to use CFURLCreateFromFileSystemRepresentation. That is where i'm having trouble. Before I go asking for help on how to use that am I correct in assuming that is the best method to get the CFURLRef for a file in my filesystem and should I ask this elsewhere?
on to asking for help....
In doing more research to make sure that I am truly stuck, I believe the issue i'm struggling with most is either because of "sourceURL" in this example from the docs:
<begin qoute> // Load the XML data using its URL. CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault, sourceURL, &xmlData, NULL, NULL, NULL);
// Parse the XML and get the CFXMLTree. cfXMLTree = CFXMLTreeCreateFromData(kCFAllocatorDefault, xmlData, sourceURL, kCFXMLParserSkipWhitespace, kCFXMLNodeCurrentVersion); <end quote>
I cant seem to figure out how to set up sourceURL correctly.
at this point in my games development i'm working on fine tuning some statistics, (an easy enough place to start) and I'm trying to read from a data and write back to it and other files, I figured XML is the way to go with the Core Foundations High Level parser. Let me know if I might want to try something else.
Also, a good reference for XML and Cocoa would be appreciated.
Thanks so much
-Mike __ ____ ____ ____ ____ ____ ____ ____ ____ ____ 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.
|
|
 |