Oracle® Database SQL Language Reference 11g Release 2 (11.2) Part Number E26088-03 |
|
|
PDF · Mobi · ePub |
XMLParse
parses and generates an XML instance from the evaluated result of value_expr
. The value_expr
must resolve to a string. If value_expr
resolves to null, then the function returns null.
If you specify DOCUMENT
, then value_expr
must resolve to a singly rooted XML document.
If you specify CONTENT
, then value_expr
must resolve to a valid XML value.
When you specify WELLFORMED
, you are guaranteeing that value_expr
resolves to a well-formed XML document, so the database does not perform validity checks to ensure that the input is well formed.
See Also:
Oracle XML DB Developer's Guide for more information on this functionThe following example uses the DUAL
table to illustrate the syntax of XMLParse
:
SELECT XMLPARSE(CONTENT '124 <purchaseOrder poNo="12435"> <customerName> Acme Enterprises</customerName> <itemNo>32987457</itemNo> </purchaseOrder>' WELLFORMED) AS PO FROM DUAL; PO ----------------------------------------------------------------- 124 <purchaseOrder poNo="12435"> <customerName> Acme Enterprises</customerName> <itemNo>32987457</itemNo> </purchaseOrder>