XML TEST WELLFORMED-FILE

This statement has the following parameter:

Parameter Description
DocumentName Nonnumeric literal or identifier of an alphanumeric data item that specifies the filename of the file that specifies the XML document to be tested. If an extension is not specified in the filename, the extension .xml is appended to the specified filename.

Description

The XML TEST WELLFORMED-FILE statement tests the XML document specified by the DocumentName parameter to see if it is well-formed. A well-formed XML document is one that conforms to XML syntax rules, but is not necessarily valid with respect to any schema. see XML VALIDATE FILE and XML VALIDATE TEXT for testing whether a document is valid with respect to a schema.

A status value is returned in the data item XML-Status of XML-data-group, which is defined in the copy file lixmldef.cpy.

Example

XML TEST WELLFORMED-FILE
    "MY-DOCUMENT".
IF NOT XML-OK GO TO Z.