I am trying load the XML
<Node>
<Subnode a = "1" b = "2" />
<Subnode a = "4" b = "5" />
</Node>
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.loadXML("c:\\test.xml");
var length = xmlDoc.childNodes.length
but length is Zero which is incorrect
From what I see this line is incorrect.
It should be
See API document for the difference between load and loadXML.
Also it’s useful to check for errors, using the parseError property, after calling any of the load methods. Something along these lines:
In addition, as indicated in the comments, the async property should be
falsenot “false”.