Home » SQL & PL/SQL » SQL & PL/SQL » XML generation from PL/SQL variables.
XML generation from PL/SQL variables. [message #39861] Mon, 19 August 2002 07:11 Go to next message
Raju Muthu
Messages: 2
Registered: August 2002
Junior Member
What would be the best way of generating an XML document based on several PL/SQL variables in a stored procedure.

In a PL/SQL stored procedure I am having 20 PL/SQL variables. The values for them are coming from different tables. At the end I would like to generate an XML document using those 20 variables and return the data as CLOB.

I tried several options

a) select those variable from dual and use the dbms_xmlgen.getxml function. It seems it works for only one variable.
b) create a dynamic view out of those variables and then use sys_xmlgen. it also doesn't work.
c) an inefficient way is create a table and insert values into it and then use the dbms function to get the xml. it is not good.

I would like to know if Oracle support has a simpler solution for the current problem.
Re: XML generation from PL/SQL variables. [message #39868 is a reply to message #39861] Mon, 19 August 2002 10:48 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
can't you just build up the xml doc by concatenating strings and variables? Does the xml document structure change?
Previous Topic: Update with outer join - Invalid column name
Next Topic: Pivot table
Goto Forum:
  


Current Time: Fri Apr 19 20:48:26 CDT 2024