The below code works fine with XML 1 but doesn't read rows from XML 2 (ROOT added). Do you know why?
Set xmlDoc = CreateObject("Msxml2.DOMDocument")
xmlDoc.async="false"
xmlDoc.setProperty "SelectionLanguage", "XPath"
xmlDoc.load("test.xml")
set nodes=xmlDoc.SelectNodes("//customer")
for i=0 to nodes.length-1
set node = nodes(i)
set company = node.selectSingleNode("company")
msgbox company
next
XML 1:
<?xml version="1.0" encoding="UTF-8"?>
<customers>
<customer>
<name>ABCars</firma>
</customer>
</customers>
XML 2:
<?xml version="1.0" encoding="UTF-8"?>
<ROOT xmlns="http://www.something.com ">
<customers>
<customer>
<name>ABCars</firma>
</customer>
</customers>
</ROOT>