An XML value is a value composed of XML elements and attributes, where elements can contain other XML elements or text. XML values can be created directly or built by parsing string values. XML values cannot be stored in records, but can be converted to string representation and stored in that form.
xml xmlVar;
In addition to declaring a variable for use with XML values, you can also perform the following operations:
Syntax: xmlagg(xml value)
Type: The argument must be an XML value. The function returns an XML value.
Example: xmlagg(xmlparse(stringCol))
Syntax: xmlconcat(xml value ..., xml value)
Type: The arguments must be XML values. The function returns an XML value.
Example: xmlconcat(xmlparse(stringCol), xmlparse('<t/>'))
Syntax: xmlelement(name xmlattributes(string AS name ..., string AS name) , xml value,...,xml value)
Type: The names must adhere to these conventions:
The function returns an XML value.
Example: xmlelement(top, xmlattributes('data' as attr1), xmlparse('<t/>'))
Syntax: xmlparse(string value)
Type: The argument must be a string value. The function returns an XML value.
Example: xmlparse('<tag/>')
Syntax: xmlserialize(xml value)
Type: The argument must be an XML value. The function returns a string.
Example: xmlserialize(xmlparse('<t/>'))