how can I do to read two tags with the same name in an XML file?

XML example
 Quote:
<site>
<name>Google< /name>
<link>www.google.com< /link>
< /site>

<site>
<name>Yahoo< /name>
<link>www.yahoo.com< /link>
< /site>



Kix code:
 Code:
Dim $objXML            ; object to hold the xml document
Dim $objNnode          ; xml node object

$objXML  = CreateObject("Msxml2.DOMDocument.6.0")

$=$objXML.load("file.xml")
$=$objXML.setProperty( "SelectionLanguage", "XPath")

$objSite1 = $objXML.selectSingleNode("/site/name")
$objLink1 = $objXML.selectSingleNode("/site/link")
; $objSite2 = $objXML.selectSingleNode("/site/name") ; how read second name?
; $objLink2 = $objXML.selectSingleNode("/site/link") ; how read second link?


someone could help me?


Edited by Glenn Barnas (2015-05-14 12:56 PM)
Edit Reason: XML freaking out the Code Formatter
_________________________