Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Parse XML from a CLOB

TexasApexDeveloperMar 9 2016 — edited Mar 10 2016

Hi,

Using Oracle 11g R2 I have the following sample XML document in a clob column in a table:

<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns0:getObjectExportInfoResponse xmlns:ns0="https://ws.exporter.xxxx.abcd.org/"><return><item><name>a_content_type</name><value>pdf</value></item><item><name>r_object_id</name><value>090269f3800a693a</value></item><item><name>object_name</name><value>test</value></item></return><return><item><name>a_content_type</name><value>msw14</value></item><item><name>r_object_id</name><value>090269f380056323</value></item><item><name>object_name</name><value>ABC-1234-JKLMN</value></item></return></ns0:getObjectExportInfoResponse></S:Body></S:Envelope>

This xml document is stored in the following table structure:

pastedImage_0.png

The xml document is considerably larger, I just truncated the file to show an example of the file. The xml document will be getting uploaded by a user and I need to then process it..

I would like to try and parse the values and display them to the user based upon a for loop and a dbms_output.put_line with each items on a separate line..

Can I ask for help in getting the xml parsed properly?

Thank you,

Tony Miller
Los Alamos, NM

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 7 2016
Added on Mar 9 2016
1 comment
964 views