Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
DOM
Expand Minimize

errorCode Property

Contains the error code of the last parse error.

lValue = oXMLDOMParseError.errorCode;

Example

The following script example attempts to load an XML document. If it encounters a parse error, it displays the error code.

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0");
xmlDoc.async = false;
xmlDoc.load("books.xml");
if (xmlDoc.parseError.errorCode != 0) {
   WScript.Echo(xmlDoc.parseError.errorCode);
} else {
   WScript.Echo(xmlDoc.documentElement.xml);
}


lValue = oXMLDOMParseError.errorCode

HRESULT get_errorCode(
    long *errorCode);

Parameters

errorCode[out, retval]

The error code returned in a decimal value.

C/C++ Return Values

S_OK

The value returned if successful.

S_FALSE

The value returned if no error occurred.

Long integer. The property is read-only. It returns the error code in decimal.

Implemented in: MSXML 3.0, MSXML 6.0

Show:
© 2015 Microsoft