Xmldoc_Object ErrorCode Property

Returns the error code for the most recent major operation on a DOM document tree.

…xmldoc_object.ErrorCode

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. This property returns the GPL error code corresponding to that status or 0 if the last major operation was successful. This property should always be checked after using the XmlDoc.LoadString method. Many internal XML processing errors are returned as -799, "XML error". If this error occurs, the property xmldoc_object.Message 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

XML Classes | xmldoc_object.Message