Functions/Procedures
closeContext
getXML
getxml takes an select statement and converts the statement's result into xml. The result is returned as a
CLOB.
alter session set nls_date_format = 'dd-mon-yyyy';
insert into something values (1,'one', '23-may-1905');
insert into something values (2,'two', '16-feb-1875');
insert into something values (3,'three', '29-sep-1891');
DBMS_XMLGEN.GETXML('SELECT*FROMSOMETHING')
--------------------------------------------------
<?xml version="1.0"?>
<ROWSET>
<ROW>
<ID>1</ID>
<COL_1>one</COL_1>
<COL_2>23-may-1905</COL_2>
</ROW>
<ROW>
<ID>2</ID>
<COL_1>two</COL_1>
<COL_2>16-feb-1875</COL_2>
</ROW>
<ROW>
<ID>3</ID>
<COL_1>three</COL_1>
<COL_2>29-sep-1891</COL_2>
</ROW>
</ROWSET>
newContext
Calling sequence
- Get context with newContext.
- Use this context when procedures or functions in dbms_xmlgen are called
- Get XML with getXML. Repeat this step if necessary.
- Close context with closeContext.
|