Updating xml clob in oracle

-- INSERT INTO XML_TABLE VALUES ( xmltype ( bfilename('XMLDIR','purchase Order.xml'), nls_charset_id('AL32UTF8') ) ); 1 row created. GETCLOBVAL() -------------------------------------------------------------------------------- 400 Oracle Parkway Redwood Shor 1 row selected. If multiple text nodes are referenced in the XPath, the text nodes are collapsed into a single text node value.

Applying an XPath expression to an XML document can result in a set of nodes.

The XPath language is a W3C Recommendation for navigating XML documents. It provides a rich set of operations that walk this tree and apply predicates and node-test functions.

For example, the expression , return the input XML data unchanged.

Any of the following SQL data types can be used as the second argument: argument is an XML value.

The query in Example 4-2 extracts the scalar value of node SELECT XMLCast(XMLQuery('/Purchase Order/Reference' PASSING OBJECT_VALUE RETURNING CONTENT) AS VARCHAR2(100)) "REFERENCE" FROM purchaseorder WHERE XMLExists('/Purchase Order[Special Instructions="Expedite"]' PASSING OBJECT_VALUE); REFERENCE ---------------------------- AMCEWEN-20021009123336271PDT SKING-20021009123336321PDT AWALSH-20021009123337303PDT JCHEN-20021009123337123PDT AWALSH-20021009123336642PDT SKING-20021009123336622PDT SKING-20021009123336822PDT AWALSH-20021009123336101PDT WSMITH-20021009123336412PDT AWALSH-20021009123337954PDT SKING-20021009123338294PDT WSMITH-20021009123338154PDT TFOX-20021009123337463PDT 13 rows selected.

649

Leave a Reply