O'Reilly logo

Oracle Database 11g: Building Oracle XML DB Applications by Jinyu Wang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

DOM Parsing in SQL

You don’t really need to perform many DOM operations in Oracle Database 11g—when you create an XMLType object, you can process it using XMLType and XQuery functions. However, there are some operations where you might need to use DOM processing. Let’s take a look at a few examples.

Retrieving and Creating a CDATA Section

This first example uses DBMS_XMLDOM (with alias XMLDOM) and DBMS_XMLPARSER (with alias XMLPARSER) to retrieve and create a new CDATA node (create_cdata.sql):

Listing 4-3 Creating a CDATA Section in SQL

declare  
l xml clob;
1 parser xmlparser.parser;
l domdocument xmldom.domdocument;
l domnode xmldom.domnode;
l domtnode xmldom.domnode;
l domfnode xmldom.domnode;
l domcnode xmldom.domnode; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required