Microsoft XML SDK 2.6 - XML Reference

errorCode Property

Contains the error code of the last parse error.

lValue = oXMLDOMParseError.errorCode

Remarks

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

Example

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

Dim xmlDoc
Set xmlDoc = CreateObject("Msxml2.DOMDocument")
xmlDoc.async = False
xmlDoc.load("c:\books.xml")
If xmlDoc.parseError.errorcode <> 0 Then
   MsgBox xmlDoc.parseError.errorCode
Else
  MsgBox xmlDoc.documentElement.xml
End If

See Also

Applies To: XMLDOMParseError Object