XML-TEXT Special Register

The XML-TEXT special register is defined during XML parsing to contain document fragments that are of class alphanumeric.

XML-TEXT is an elementary alphanumeric data item of the length of the contained XML document fragment. The length of XML-TEXT can vary from zero through 16,000,000 bytes.

Note: There is no equivalent COBOL data description entry.

When used in nested programs, this special register is implicitly defined with the global attribute in the outermost program.

The parser sets XML-TEXT to the document fragment associated with an event before transferring control to the processing procedure when the operand of the XML PARSE statement is an alphanumeric data item, except for the ATTRIBUTE-NATIONAL-CHARACTER event and the CONTENT-NATIONAL-CHARACTER event.

When XML-TEXT is set, the XML-NTEXT special register has a length of zero. At any given time, only one of the two special registers XML-NTEXT and XML-TEXT has a non-zero length.

Use the LENGTH function or the LENGTH OF special register for XML-TEXT to determine the number of bytes that XML-TEXT contains.

Note: Start of change The START-DOCUMENT event may be greater than 16,000,000 characters. In this case, special register XML-TEXT will contain only the first 16,000,000 characters of the event, and its LENGTH will be set to 16,000,000 bytes. End of change

XML-TEXT cannot be used as a receiving item.