But I was browsing the same requirement over forum, got solutions related to DBMS_XMLPARSER and DBMS_XMLDOM.
I tried to go through its details but didnt get much idea on the same.
Can anyone please help me to understand about use of dbms_xmlparser and dbms_xmldom and about DOM.
In which scenario we need to use them?
DBMS_XMLPARSER and DBMS_XMLDOM are from at least the 8i days (back then called XMLParse and XMLDOM). XMLType and all the other features we now know did not start appearing until 126.96.36.199. DOM loads the entire XML document into memory before parsing and the newer features can avoid this by streaming the XML when parsing it. This prevents the entire XML content from being loaded into memory at once. This is the general direction Oracle has been going for some time now and so their performance/improvement efforts have been in those newer areas.
Depending upon your version, if it is >= 10.2, you would want to use XMLTable or XMLQuery to retrieve data from the XML.
So in other words, ignore the DBMS_XMLPARSER and DBMS_XMLDOM functionality for now and use the newer functionality Oracle provides.
Note: This is only the observation of an outsider as I do not work for Oracle nor speak for them.
Where I was thinking with that sentence is the "streaming evaluation" that Oracle now offers. This option is available when XML is stored in an XMLType column of SECUREFILE BINARY format (introduced in 188.8.131.52 and default for XMLType columns in 184.108.40.206) and that data is queried/accessed.
You can find some information on it here
(Search for "streaming")
and here as well
Streaming is basically reading the data as Oracle scans past it since it knows, based on the binary storage format, what the XML looks like, so it does not need to create the whole document to find the sections the XPath/XQuery specifies. You can see that a SQL statement is using streaming evaluation when "XPATH EVALUATION" shows up in the explain plan as shown by
This option is only available when the XML is stored in the DB in the correct format. If the XML is stored in a PL/SQL variable, Oracle cannot use streaming evaluation on it.