element-content-expression
A string. An element is generated for each element-content-expression argument that is specified. The element-content-expression value becomes the content of the element. For example, if you specify the EmployeeID column from the Employees table for
this argument, then an <EmployeeID> element containing an EmployeeID value is generated for each value in the table.
Specify the element-name argument if you want to assign a name other than the element-content-expression to the element, otherwise the element name defaults to the element-content-expression name.
Produces a forest of XML elements. In the unparsed XML document, a forest refers to the multiple root nodes within the document.
When all the arguments to the XMLFOREST function are NULL, a NULL value is returned. If only some values are NULL, the NULL
values are omitted from the result. Element content is always quoted unless the data type is XML. You cannot specify attributes
using the XMLFOREST function. Use the XMLELEMENT function if you want to specify attributes for generated elements.
Element names are escaped unless the data type is XML.
If you require a well-formed XML document, you must ensure that your query is written so that a single root element is generated.
Data in BINARY, LONG BINARY, IMAGE, and VARBINARY columns is automatically returned in base64-encoded format when you execute
a query that contains XMLFOREST.
SQL/2008
XMLFOREST constitutes part of optional SQL/2008 language feature X032. SQL Anywhere does not support the optional XMLNAMESPACES
clause, or the OPTION clause, with the XMLFOREST function.