2.48 :validate()

This method checks if the XML Document conforms to the document type indicated in its DOM tree. When no document type is contained, an error is returned.

Definition

integer :validate
(
  { string ErrorMsg := null output }
)

Parameters

string ErrorMsg := null output
When this optional parameter is given, it is initialized with "". If an error occurs, the parameter is assigned with the error message from the system. However, it is more reliable to query the return value of the method.

Return value

0
Successful validation; the XML Document meets the document type.
DOM error code
The XML Document does not conform to the document type.
‑1
Internal error. ErrorMsg is not set.

Objects with this method

document