validateOnParse Property
Indicates whether the parser should validate this document.
boolValue = oXMLDOMDocument.validateOnParse; objXMLDOMDocument.validateOnParse = boolValue;
Example
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0"); xmlDoc.async = false; xmlDoc.validateOnParse = true; xmlDoc.load("books.xml"); if (xmlDoc.parseError.errorCode != 0) { var myErr = xmlDoc.parseError; WScript.Echo("You have error " + myErr.reason); }