DEFINE QTAG Command (XML)

DEFINE qtagname QTAG starttag[,starttag]…  ;
DEFINE QTAG
Defines a local identifier for a qualified tag which can be used later in the page definition on a XLAYOUT command. A QTAG is a sequence of one or more start-tag names which taken together identify an XML data element. This is the logical equivalent of the record IDentifier on the LAYOUT command for a record formatting page definition. But, instead of identifying an entire record as the LAYOUT command does, the QTAG identifies a single XML data element.

When used, the local identifier makes the coding of an XLAYOUT command easier by allowing the use of a locally defined name instead of the fully-qualified set of start tags. It also makes the XLAYOUT command syntax similar to the LAYOUT command.

qtagname
The internal name assigned to the fully-qualified QTAG. This name can be used on the XLAYOUT command to identify the XML data item. This name is not case sensitive. It can be up to 16 characters in length.
starttag
An XML element name. This name must match exactly to the element name in the XML data. To preserve the case for the name, put it in quotes. Otherwise, the name is folded to upper case. Separate multiple starttag values with commas.

If necessary, the name is translated to the datatype specified or defaulted by the UDTYPE subcommand on the PAGEDEF command. For example, if the page definition is coded on an EBCDIC platform, but the UTDTYPE specifies UTF8, PPFA converts the start tags from EBCDIC code page 500 to UTF-8.

See the XLAYOUT Command (XML) for an example of using a defined QTAG with an XLAYOUT command.