The XMLDOMParseError object returns detailed information about the last parse error, including the error number, line number, character position, and a text description.
Example
The following example attempts to load an XML document. It then tests the XMLDOMParseError object's errorCode property to see if an error has occurred:
Dim xmlDoc
Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.async = False
xmlDoc.load("c:\books.xml")
If xmlDoc.parseError.errorCode <> 0 Then
MsgBox ("A parse error occurred.")
Else
MsgBox xmlDoc.documentElement.xml
End If
See Also