XML problem

I’m trying to parse the .toc.plist file created by MacOS when an audio CD is loaded, so that I can get the track start positions. I’ve managed to use xmlnode.XQL queries to retrieve the nodes containing the values. The extracted node is in this form:

<Integer>12345</Integer>

where 12345 is the track offset that I’m looking for. I realize that from this point I could just convert the node to a string and use simple string functions to remove the tags, but it seems to me that there should be a function available in the xml class to extract the inner text enclosed by the tags. However, if there is, I haven’t managed to find it. I had assumed that xmlnode.value should do this, but it returns an empty string. Any idea how to do this without string functions?

I do something like the following:

If intNode <> Nil And intNode.Length = 1 And intNode.Item(0).ChildCount > 0 Then intValueAsText = intNode.Item(0).FirstChild.Value End If
I do all the If statement checking first, before extracting the FirstChild.Value , just to make sure the Xml element isn’t empty. Otherwise it’ll error.

I hope that helps.

Edit: my intNode assumes you have referenced the <Integer/> element directly. And in case you’re wondering, FirstChild actually refers to the text 12345, because the textual values of Xml elements are also considered “nodes” or “child” components of the Xml structure.

Thanks Scott. I thought I’d tried FirstChild.Value, but apparently not. Works like a charm.