XML GET TEXT

This statement has the following parameters:

Parameter Description
DocumentPointer The COBOL pointer data item that will point to the in-memory text after successful completion of the statement.
DocumentLength The name of a COBOL numeric data item that will contain the length of the generated XML document pointed to by DocumentPointer after successful completion of the statement.
DocumentName The filename of XML document containing the text to load into memory.

Description

The XML GET TEXT statement copies the content of an XML document from the file specified by the DocumentName parameter to COBOL memory. A block of memory is allocated to contain the document. The address and size of the memory block are returned in the DocumentPointer and DocumentLength parameters.

When the program has finished using the in-memory document, a call to XML FREE TEXT should be made to release the allocated memory.

A status value is returned in the XML-data-group data item, which is defined in the copybook, lixmldef.cpy.

Example

XML GET TEXT
    MY-POINTER
    MY-LENGTH
    "MY-DOCUMENT".
IF NOT XML-OK GO TO Z.