I've read the docs and I just don't understand. How can I take a
.plist file, read and parse it, then iterate through each element?
A plist is not necessarily XML....it can be an old style plist fwiw.
The .plist root is an array, each element in the array is a
dictionary. Somewhere in the docs it illustrates how to use
CFXMLTreeCreateFromData, but the resulting tree was nil. I'm totally
confused about all the nodes and trees and property lists. Anybody
have some sample source?
Just a while ago we discussed this on the list, here's what i posted
then.... (look for a thread titled "CFXML Parser Woes" for more info)
In a nutshell....
Use CFXMLTreeCreateFromData to get a CFXMLTree
call CFTreeGetChildCount on the tree to get the number of child elements
to get a given child element use CFTreeGetChildAtIndex
to get a node for the child element use CFXMLTreeGetNode
to get the name of the node use CFXMLNodeGetString
to get the the content of the node use CFXMLNodeGetString
Be sure to check for errors (NULL results), etc.
Bryan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden