Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

71
DBMS_XMLGEN

DBMS_XMLGEN converts the results of a SQL query to a canonical XML format. The package takes an arbitrary SQL query as input, converts it to XML format, and returns the result as a CLOB.

This package is similar to the DBMS_XMLQUERY package, except that it is written in C and compiled into the kernel. This package can only be run on the database.

See Also:

Oracle9i XML Reference for more information on XML support and for an example of how to use DBMS_XMLGEN. 

This chapter discusses the following topics:

Summary of DBMS_XMLGEN Subprograms

Table 71-1 DBMS_XMLGEN Subprograms  
Subprogram  Description 

"newContext Function" 

Creates a new context handle from a passed-in SQL query. The context handle can be used for the rest of the functions. 

"setRowTag Procedure" 

Sets the name of the element enclosing each row of the result. The default tag is ROW. 

"setRowSetTag Procedure" 

Sets the name of the element enclosing the entire result. The default tag is ROWSET. 

"getXML Procedure"  

Appends 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"  

Gets the number of SQL rows that were processed in the last call to getXML. 

"setMaxRows Procedure" 

Sets the maximum number of rows to be fetched each time. 

"setSkipRows Procedure" 

Sets the number of rows to skip every time before generating the XML. The default is 0. 

"setConvertSpecialChars Procedure" 

Sets whether special characters such as $, which are non-XML characters, should be converted or not to their escaped representation. The default is to perform the conversion. 

"useItemTagsForColl Procedure" 

Forces the use of the collection column name appended with the tag _ITEM for collection elements. The default is to set the underlying object type name for the base element of the collection. 

"restartQUERY Procedure" 

Restarts the query to start fetching from the beginning. 

"closeContext Procedure" 

Closes the context and release all resources. 


Go to previous page Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback