PRINTX

Prints an XML formatted row of data in a report.

Syntax

PRINTX [NAME = identifier] expression
  1. identifier is the name to be used in the XML node.
  2. expression is any legal language expression.

Usage

The PRINTX statement is similar to PRINT, except that it prints data in XML format. You typically write a complete report with PRINTX statements, to generate an XML output.

To generate XML output, you must redirect the report output into a SAX document handler with the TO XML HANDLER clause of START REPORT:
MAIN
  ...
  START REPORT orders_report
      TO XML HANDLER om.XmlWriter.createFileWriter("orders.xml")
  ...
END MAIN

Unlike normal PRINT instructions, the PRINTX outputs both TEXT and BYTE data. The BYTE data is encoded to Base64 before output.