December 2010
Intermediate to advanced
451 pages
11h 16m
English
You need to provide XML data for PL/SQL or other consumers of data from your Oracle database.
Use Oracle's built-in DBMS_XMLGEN package to extract data from the database in standard XML format and then output the data through the Apache web server. In this example a generic procedure builds and outputs XML formatted data based on the SQL query statement passed to it. This procedure can be used in any application that requires XML output extracted from database tables.
CREATE OR REPLACE PROCEDURE gen_xml (sql_stmt VARCHAR2) IS
string VARCHAR2(4000);
ipos INTEGER;
offset INTEGER;
n INTEGER := 1;
qryctx dbms_xmlgen.ctxhandle; result CLOB; ...Read now
Unlock full access