Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML Output From Oracle XML Output from Oracle. Step 1  First, let's create a sample table CREATE TABLE TEST_1 ( "NAME" VARCHAR2(20 BYTE), "AGE" VARCHAR2(20.

Similar presentations


Presentation on theme: "XML Output From Oracle XML Output from Oracle. Step 1  First, let's create a sample table CREATE TABLE TEST_1 ( "NAME" VARCHAR2(20 BYTE), "AGE" VARCHAR2(20."— Presentation transcript:

1 XML Output From Oracle XML Output from Oracle

2 Step 1  First, let's create a sample table CREATE TABLE TEST_1 ( "NAME" VARCHAR2(20 BYTE), "AGE" VARCHAR2(20 BYTE), "PHONE" VARCHAR2(20 BYTE))

3 Step 2  create a procedure PROCEDURE SelectXML(Sql_Query IN String, xmlDoc OUT CLOB ) AS ctx NUMBER; BEGIN ctx := DBMS_XMLGEN.newContext(Sql_Query ); xmlDoc := DBMS_XMLGEN.getXML(ctx); DBMS_OUTPUT.put_line(xmlDoc); DBMS_XMLGEN.closeContext(ctx); EXCEPTION WHEN OTHERS THEN DBMS_XMLGEN.closeContext(ctx); RAISE; END SelectXML;

4 Step 3  create a Schema <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema” xmlns:msdata="urn:schemas-microsoft-com:xml-msdata” id="ROWSET“ elementFormDefault="unqualified" attributeFormDefault="unqualified">

5 Step 4

6

7

8

9

10 Thank You


Download ppt "XML Output From Oracle XML Output from Oracle. Step 1  First, let's create a sample table CREATE TABLE TEST_1 ( "NAME" VARCHAR2(20 BYTE), "AGE" VARCHAR2(20."

Similar presentations


Ads by Google