DBMS_XMLGEN [message #206460] |
Thu, 30 November 2006 02:44 |
srraajesh
Messages: 63 Registered: May 2005
|
Member |
|
|
Hi,
Iam trying to create an XML using DBMS_XMLGEN. My PL/SQL code looks like this
CTX := DBMS_XMLGEN.newContext(sqlstring);
DBMS_XMLGen.setRowsetTag(CTX, 'ACTIVATE_USIM_INPUT');
DBMS_XMLGen.setRowTag(CTX, '');
RES :=DBMS_XMLGen.getXML(CTX);
I want my output XML to be of this format
<?xml version="1.0"?>
<Header>
<R1>999999999</R1>
<R2>111111</R2>
<R3>333</R3>
<R4>ABCD1234<R4>
<R5>EF</R5>
<R6>0</R6>
</Header>
Now, R1, R2, R3 are generated using Oracle Sequence. R4 a database field value concatenated with static text. R5 and R6 are static text again.
I have declared a cursor, which will help me in fetching R4.
Iam struck with constructing "sqlstring" dynamically. How can I frame it in a dynamic way so that I can directly pass it to DBMS_XMLGEN.newContext? Please help me out.
Raajesh
|
|
|