Oracle® Database SQL Reference 10g Release 2 (10.2) Part Number B14200-02 |
|
|
View PDF |
Syntax
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
.
Examples
The following statement uses the DUAL
table to illustrate the syntax of XMLSerialize
:
SELECT XMLSERIALIZE(CONTENT XMLTYPE('<Owner>Grandco</Owner>')) FROM DUAL;