Set xmlDom = CreateObject("MSXML2.DOMDocument.6.0") xmlDom.async = False xmlDom.loadXML "<?xml version='1.0'?>" & _ "<Root xmlns='MyNameSpace'>" & _ " <Test> This is a Test " & _ " <Test2> This is a Test2 " & _ " <Test3> Node 1 " & _ " </Test3> " & _ " </Test2>" & _ " </Test> " & _ " <Test3> Node 2 </Test3>" & _ "</Root>" Wscript.Echo ".getProperty( SelectionLanguage ) = " & .getProperty( "SelectionLanguage" ) xmlDom.setProperty "SelectionLanguage", "XPath" xmlDom.setProperty "SelectionNamespaces", "xmlns:myNS='MyNameSpace'" Set oNode = xmlDom.selectSingleNode("//myNS:Test3[position()=2]") Wscript.Echo oNode.xml
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)