XMLSERIALIZE

Syntax

Description of XMLSerialize.gif follows
Description of the illustration XMLSerialize.gif

Purpose

XMLSerialize creates a string or LOB containing the contents of value_expr.

  • If you specify DOCUMENT, then the value_expr must be a valid XML document.

  • If you specify CONTENT, then the value_expr need not be a singly rooted XML document. However it must be valid XML content.

  • The datatype specified can be a string type (VARCHAR2 or VARCHAR, but not NVARCHAR or NVARCHAR2) or CLOB . The default is CLOB.

See Also:

Oracle XML DB Developer's Guide for more information on this function

Examples

The following statement uses the DUAL table to illustrate the syntax of XMLSerialize:

SELECT XMLSERIALIZE(CONTENT XMLTYPE('<Owner>Grandco</Owner>'))
   FROM DUAL;