The objects corresponding to the progids Msxml.DOMDocument
and Microsoft.XMLDOM
don't expose a member called constructor
through IDispatch.
To verify that the object has been successfully returned, you could try using members that are part of the interface defined by IXMLDOMDocument
instead.
For example, changing your script thus:
var objXML = new ActiveXObject( "Microsoft.XMLDOM" );
objXML.loadXML("<x/>")
WScript.Echo("objXML:"+objXML.xml);
var objXML2 = WScript.CreateObject("Msxml.DOMDocument");
WScript.Echo("objXML2:"+objXML2.nodeTypeString);
gives:
objXML:<x/>
objXML2:document
Note that if the objects were not being created, you would receive an exception ("Could not locate automation class...") at the point at which you attempt the creation, which you would see if you had a typo in the progid, thus: new ActiveXObject( "MicrosoftX.MLDOM" );