This statement has the following parameters:
Parameter | Description |
---|---|
DocumentPointer | An identifier of a COBOL pointer data item that points to an XML document stored in memory as a text string. |
DocumentLength | An identifier of a COBOL numeric data item that contains the length of the XML document pointed to by DocumentPointer. |
SchemaName | A nonnumeric literal or an identifier of an alphanumeric data item, the value of which is the name of a file containing an XML schema that will be used to validate the document specified by the DocumentPointer and DocumentLength parameters. |
The XML VALIDATE TEXT statement tests the XML document specified by the DocumentPointer and DocumentLength parameters to see if it is well-formed and valid.
A well-formed XML document is one that conforms to XML syntax rules. A valid XML document is one that is both well-formed and has content that conforms to rules specified by an XML schema file. The schema file is supplied by the user.
A status value is returned in the XML-data-group data item, which is defined in the copybook, lixmldef.cpy.
XML VALIDATE TEXT MY-DOCUMENT-POINTER MY-DOCUMENT-LENGTH "MY-SCHEMA". IF NOT XML-OK GO TO Z.