Returns the detailed error message for the most recent major operation on a DOM document tree.
…xmldoc_object.Message
Prerequisites
None
Parameters
None
Remarks
When a major operation is performed on an XML document tree, for example creating it or storing it, the error status is saved within the corresponding XmlDoc object. If an error occurs, as indicated by xmldoc_object.ErrorCode being non-zero, this property returns a detailed message. Many internal XML processing errors return an xmldoc_object.ErrorCode of -799, "XML error". If this error occurs, the xmldoc_object.Message property should be used to determine the details of the error.
Examples
Dim doc As XmlDoc
Dim instr As String
. . .
doc = XmlDoc.LoadString(instr) ' Parse the input
If (doc.ErrorCode <> 0) Then ' Check for errors
Console.Writeline("Input error " & CStr(doc.ErrorCode) _
& ", " & doc.Message)
End If
See Also