2008 Oct 29, 18:01 PST
Thanks for the input. As Samuel V. as pointed out, I need to be very
specific about how I name my nodes.
As a side note, the online tutorial at http://www.softwareag.com/xml/library/xql-tutorial.htm
states that just typing 'programme' should give the same results as
'//programme'. This could be a custom behaviour, but the tutorial was
not clear on that point.
At any rate, I have my XQL sample working. Thanks again!
-----
J.C. Cruz
Freelance Writer
MacTech/REALbasic Developer/Python Magazine
anarakisware-at-gmail-dot-com
On 29 Oct 2008, at 16:05:48, Bart Alcorn wrote:
The "programme" node is a child of the "radio" node, so you need to
drill
down the tree in order to find it.
There are two major ways to do this:
1. use the descendant operator ("//"), which will find the target node
anywhere in the tree
i.e. tXML.xql("//programme")
2. set a base node, and then query it
// no error checking here at all for simplicity's sake!
dim radioNode as XMLNode
radioNode = xdoc.xql( "radio" ).Item(0) // no error checking to
see if the
item exists!!
// radioNode is now an XMLNode
dim programmeList as XMLNodeList
programmeList = radioNode.xql( "programme" )
// bare minimal error checking
dim programme as XMLNode
if programmeList.Length > -1 then programme = programmeList.Item(0)
Hope this helps!
--
Bart Alcorn
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|