xquery-constructor
An XQuery constructor. The XQuery constructor is an item defined in the XQuery language. It gives a syntax for constructing
XML elements based on XQuery expressions. The xquery-constructor argument must be a well-formed XML document with one or more variable references. A variable reference is enclosed in curly
braces and must be prefixed with a $ and have no surrounding white space. For example:
SELECT XMLGEN( '<a>{$x}</a>', 1 AS x );
content-expression
A variable. You can specify multiple content-expression arguments. The optional variable-name argument is used to name the variable. For example,
SELECT XMLGEN( '<emp EmployeeID="{$EmployeeID}"><StartDate>{$x}</StartDate></emp>',
EmployeeID, StartDate
AS x )
FROM Employees;
Computed constructors as defined in the XQuery specification are not supported by the XMLGEN function.
When you execute a query that contains an XMLGEN function, data in BINARY, LONG BINARY, IMAGE, and VARBINARY columns is automatically
returned in base64-encoded format.
Element content is always escaped unless the data type is XML. Illegal XML element and attribute names are also escaped.