Skip to Main Content

DevOps, CI/CD and Automation

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!

How to retrieve values in XML into a plsql table type

608473May 5 2011 — edited May 15 2011
Hi

I have an XML doc like below which is a Web Service response message.

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<GetOrgInput xmlns="http://www.example.org/ComplianceServices">
<ProgramName>PgmA-PgmB</ProgramName>
<ItemName>800 ADSL</ItemName>
<Orgs>923</Orgs>
<Orgs>1163</Orgs>
<Orgs>1103</Orgs>
</GetOrgInput>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

From the above doc you could see that i have multiple occurrences of "Orgs" element. Usually i am using the .extract and .getSTringVal() to retrieve the values as below.

l_string_variable := p_response.doc.extract('//'||p_name||'/child::text()',p_namespace).getStringVal();

But in this case if i do that, i am getting value as 92311631103. I need to get them into a table type of number. Pls advice me on how to achieve this.

Thanks
PKV
This post has been answered by Jason_(A_Non) on May 10 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2011
Added on May 5 2011
16 comments
3,111 views