DB2 Version 9.7 for Linux, UNIX, and Windows

XMLTEXT scalar function

Read syntax diagramSkip visual syntax diagram
>>-XMLTEXT--(--string-expression--)----------------------------><

The schema is SYSIBM. The function name cannot be specified as a qualified name.

The XMLTEXT function returns an XML value with a single XQuery text node having the input argument as the content.

string-expression
An expression whose value has a character string type: CHAR, VARCHAR or CLOB.

The data type of the result is XML. If the result of string-expression can be null, the result can be null; if the input value is null, the result is the null value. If the result of string-expression is an empty string, the result value is an empty text node.

Examples: