To use Xpath queries with MSXML, don’t forget to set the following propoerty of your xml document object :
xmlDocument.setProperty “SelectionLanguage”, “XPath”
Example :
Set xmlDocument = New DOMDocument40
xmlDocument.Load(”example.xml”);
xmlDocument.setProperty “SelectionLanguage”, “XPath”
Set xmlNode = xmlDocument.selectSingleNode(”//COMPANY/CUSTOMER[substring(@type,1,2) =’FR’]”)
Refer to the microsoft Knowledge base : How To Use XPath Queries in MSXML DOM selectNodes Method