I\'m new in Oracle and I\'ve - maybe trivial - a problem in a select. (I\'m using Oracle 10g Express Edition).
I\'ve a DB with a field CLOB: mytab.xml This column have a
You can try creating DBMS_XMLPARSER.parser object from the CLOB XML and get a DBMS_XMLDOM.DOMDocument object from it. Then use DBMS_XMLDOM package methods to get the value of any node.
xml_ CLOB := 'X';
p DBMS_XMLPARSER.parser;
doc_ DBMS_XMLDOM.DOMDocument;
-- Convert the CLOB into a XML-document
P := DBMS_XMLPARSER.newparser();
-- Parse the clob and get the XML-document
DBMS_XMLPARSER.parseclob(p, xml_);
doc_ := DBMS_XMLPARSER.getDocument(p);
Then use the below methods to extract node value
DBMS_XMLDOM.getElementsByTagName(doc_, 'NodeName'); DBMS_XMLDOM.GetNodeValue(node_obj_);
Refer more about DBMS_XMLDOM methods here.