Ram Karthik
asked on
Convert Oracle data into XML document
Hi Experts
I need to create a generic stored procedure which will take table name as input parameter and create xml file with below format. Xml file name should be table name and I've never done this before. Could you please help?
I tried few methods in Oracle but the output is not coming as expected.
<?xml version="1.0" encoding="UTF-8"?>
<MessageData>
<Category>NewSubmission</C ategory>
<TimeStamp>2016-07-22T12:1 1:00Z</Tim eStamp>
<ProdID>1234567890</ProdID >
</MessageData>
<Submission>
<ReportingPeriod>2015-12-3 1</Reporti ngPeriod>
<Replacement>
<MessageRef>12345678902016 082313392R EP</Messag eRef>
<ReplacedMessageRef>123456 7890201607 2212110NEW </Replaced MessageRef >
</Replacement>
</Submission>
<Person>
<FirstName>a</FirstName>
<LastName>a</LastName>
<Address>
<City>a</City>
<CountryCode>AF</CountryCo de>
<ResCountryCode>AF</ResCou ntryCode>
</Address>
</Person>
I need to create a generic stored procedure which will take table name as input parameter and create xml file with below format. Xml file name should be table name and I've never done this before. Could you please help?
I tried few methods in Oracle but the output is not coming as expected.
<?xml version="1.0" encoding="UTF-8"?>
<MessageData>
<Category>NewSubmission</C
<TimeStamp>2016-07-22T12:1
<ProdID>1234567890</ProdID
</MessageData>
<Submission>
<ReportingPeriod>2015-12-3
<Replacement>
<MessageRef>12345678902016
<ReplacedMessageRef>123456
</Replacement>
</Submission>
<Person>
<FirstName>a</FirstName>
<LastName>a</LastName>
<Address>
<City>a</City>
<CountryCode>AF</CountryCo
<ResCountryCode>AF</ResCou
</Address>
</Person>
Can you show the table structures and the data that would be used to produce your example xml file?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.