Convert the results of an SQL query to XML format.
In general, use DBMS_XMLGEN instead of DBMS_XMLQUERY wherever possible.
Subprocedures: newContext Function Create a new context handle from a passed-in SQL query. The context handle can be used for the rest of the functions. setRowTag Set the name of the element enclosing each row of the result. The default tag is ROW. setRowSetTag Set the name of the element enclosing the entire result. The default tag is ROWSET. getXML Append the XML to the CLOB passed in. Use the getNumRowsProcessed function to figure out if any rows were appended. getXML Function Returns the XML as a CLOB. getNumRowsProcessed Function Get the number of SQL rows that were processed in the last call to getXML. setMaxRows Set the maximum number of rows to be fetched each time. setSkipRows Set the number of rows to skip every time before generating the XML. The default is 0. setConvertSpecialChars Sets whether special characters such as $, which are non-XML characters, should be converted to their escaped representation. useItemTagsForColl Force the use of the collection column name appended with the tag _ITEM for collection elements. restartQUERY Restart the query to start fetching from the beginning. closeContext Close the context and release all resources.
For full documentation of the packaged procedures
above see the Oracle Manual:
"Oracle9i Supplied PL/SQL Packages and Types Reference"
or the book Oracle Built in Packages by Steven Feuerstein et al