Given the XML:
<?xml version="1.0" encoding="UTF-8"?>
<League>
<Team name="Seagulls">
<Player name="Bob" position="1B" />
<Player name="Tom" position="2B" />
</Team>
<Team name="Pigeons">
<Player name="Bill" position="1B" />
<Player name="Tim" position="2B" />
</Team>
<Team name="Crows">
<Player name="Ben" position="1B" />
<Player name="Ty" position="2B" />
</Team>
</League>
I can use: (stolen from http://documentation.xojo.com/index.php/XMLNode.XQL )
[code]// Load XML
Dim xml As New XmlDocument
Try
xml.LoadXml(kTestXml)
Catch e As XmlException
MsgBox("XML error: " + e.Message)
End Try
// Display all the Player names
Dim nodes As XmlNodeList
nodes = xml.XQL("//Player") // Find all Player nodes in XML
// Loop through results and display each name attribute
Dim node As XmlNode
For i As Integer = 0 To nodes.Length-1
node = nodes.Item(i)
MsgBox("Player: " + node.GetAttribute(“name”))
Next[/code]
What if I only want the players from the Pigeons (Bill, and Tim)?