Results for DBMS_XMLGEN


1 to 20 of 75 results. Prev  Next
Results per page:   20  | 40 | 60


XML API Reference - XDK and Oracle XML DB, 9i Release 2 (9.2.0.2)

Generating Queries Using DBMS_XMLGEN for PL/SQL

DBMS_XMLGEN PackageDescription of DMS_XMLGEN DBMS_XMLGEN converts the results of a SQL query to a canonical XML format

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 1 of 2

85 DBMS_XMLGENDBMS_XMLGEN converts the results of a SQL query to a canonical XML format. The package takes an … more information on XML support and for an example of how to use DBMS_XMLGEN. This chapter details the following: Functions and Procedures of DBMS_XMLGEN

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

Functions and Procedures of DBMS_XMLGENTable 85-1: Summary of Functions and Procedures of DBMS_XMLGEN   Function/Procedure Description

XML API Reference - XDK and Oracle XML DB, 9i Release 2 (9.2.0.2)

Generating Queries Using DBMS_XMLGEN for PL/SQL

Functions and Procedures of DBMS_XMLGENTable 30-1 Summary of Functions and Procedures of DBMS_XMLGEN Function/Procedure Description

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

newContext()Generates and returns a new context handle; this context handle is used in getXML() and other functions to get XML back from the result. The available options are given in the table below. Syntax Description DBMS_XMLGEN.newContext ( query IN VARCHAR2) RETURN ctxHandle; Generates a new context handle from a query. DBMS_XMLGEN.newContext ( queryString IN SYS_REFCURSOR) RETURN ctxHandle; Generates a

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 1 of 2

Description of DMS_XMLGENDBMS_XMLGEN converts the results of a SQL query to a canonical XML format. The package takes an

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

getNumRowsProcessed()Retrieves the number of SQL rows processed when generating the XML using the getXML call; this count does not include the number of rows skipped before generating the XML. Used to determine the terminating condition if calling getXML() in a loop. Note that getXML() always generates an XML document, even if there are no rows present.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

setRowSetTag ()Sets the name of the root element of the document. The default name is ROWSET. User can set the rowSetTag NULL to suppress the printing of this element. However, an error is produced if both the row and the rowset are NULL and there is more than one column or row in the output; this is because the generated XML would not have a top-level enclosing tag, and so would be invalid.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

getXML()Gets the XML document. When the rows indicated by the setSkipRows() call are skipped, the maximum number of rows as specified by the setMaxRows() call (or the entire result if not specified) is fetched and converted to XML. Use the getNumRowsProcessed() to check if any rows were retrieved. The available options are given in the table below. Syntax Description FUNCTION DBMS_XMLGEN.getXML ( ctx IN ctxHandle,

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

closeContext()bind and define buffers. After this call, the handle cannot be used for a subsequent DBMS_XMLGEN function call.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

setSkipRows()Skips a given number of rows before generating the XML output for every call to the getXML routine. Used when generating paginated results for stateless Web pages using this utility. For example, when generating the first page of XML or HTML data, set skipRows to zero. For the next set, set the skipRows to the number of rows obtained in the first case. See getNumRowsProcessed().

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

SyntaxDBMS_XMLGEN.restartQUERY (ctx IN ctxHandle); Parameter IN / OUT Description ctx (IN) The context handle corresponding to the current query.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

SyntaxDBMS_XMLGEN.closeContext ( ctx IN ctxHandle); Parameter IN / OUT Description ctx (IN) The context handle to close. Copyright © 2000, 2002 Oracle Corporation. All Rights Reserved. Home Book List Contents Index Master Index Feedback

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

SyntaxDBMS_XMLGEN.setRowSetTag ( ctx IN ctxHandle, rowSetTag IN VARCHAR2); Parameter IN / OUT Description ctx (IN) The context handle obtained from the newContext call. rowSetTag (IN) The name of the document element. Passing NULL indicates that you do not want the ROWSET element present.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

convert()Converts the XML data into the escaped or unescaped XML equivalent; returns XML CLOB data in encoded or decoded format. Escapes the XML data if the ENTITY_ENCODE is specified. For example, the escaped form of the character < is <. Unescaping is the reverse transformation. The available options are given in the table below. Syntax Description DBMS_XMLGEN.convert ( xmlData IN VARCHAR2, flag IN NUMBER:=

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

SyntaxDBMS_XMLGEN.useItemTagsForColl ( ctx IN ctxHandle); Parameter IN / OUT Description ctx (IN) The context handle.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

setConvertSpecialChars()Sets whether or not special characters in the XML data must be converted into their escaped XML equivalent. For example, the, \", ', which must be escaped. It is expensive to scan the character data to replace the special characters, particularly if it involves a lot of data. Syntax DBMS_XMLGEN.setConvertSpecialChars ( ctx IN ctxHandle, conv IN boolean); Parameter IN / OUT Description ctx (IN) The

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

useItemTagsForColl()Overrides the default name of the collection elements. The default name for collection elements is the type name itself. Using this function, you can override the default to use the name of the column with the _ITEM tag appended to it. If there is a collection of NUMBER, the default tag name for the collection elements is NUMBER. Using this procedure, the user can override this behavior and generate

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

setMaxRows()Sets the maximum number of rows to fetch from the SQL query result for every invokation of the getXML call. Used when generating paginated results. For example, when generating a page of XML or HTML data, restrict the number of rows converted to XML or HTML by setting the maxRows parameter.

Supplied PL/SQL Packages and Types Reference, 9i Release 2 (9.2.0.2)

DBMS_XMLGEN, 2 of 2

SyntaxDBMS_XMLGEN.setSkipRows ( ctx IN ctxHandle, skipRows IN NUMBER); Parameter IN / OUT Description ctx (IN) The context handle corresponding to the query executed. skipRows (IN) The number of rows to skip per call to getXML.


Was this page helpful?