0

I have a bunch of code

var xmlDoc = new ActiveXObject("MSXML2.DOMDocument.3.0");
    xmlDoc.async=false;
    xmlDoc.loadXML(sHTTP);
    
    var rootElement = new String(xmlDoc.documentElement.Name);
    Response.Write(rootElement);

The problem is that when I try to display the rootElement Node Name, it appears as 'undefined' on my browser. I also tried xmlDoc.documentElement.NodeName.

Any help will be greatly appreciated.

Thanks

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by hielo
0

...also tried xmlDoc.documentElement.NodeName.

Try lowercase "N" for Node
xmlDoc.documentElement.nodeName.

If the problem persists, verify that the document loaded correctly - on line 4 put: Response.Write(xmlDoc.xml); If you do not see the xml document, then it was not retrieved.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.