Skip to Main Content

SQL & PL/SQL

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Parse data from XML

HaniYSJun 8 2015 — edited Jun 8 2015

Hi

DB version 11.2.0.1

I have clob with name "a" in table dummy_clob which include XML date, i need to select this data but there is error apper ORA-19228: XPST0008

Query:

SELECT x.Cba_Number,x.Reference_Id

  FROM dummy_clob t,

       XMLTABLE (

           '/ns2:SearchResponseType xmlns:ns2="##default" xmlns="urn:com.xxx:xxx:xxx:1"'

           PASSING xmltype (t.a)

           COLUMNS Cba_Number VARCHAR2 (2000) PATH 'CbaNumber',

                   Reference_Id VARCHAR2 (2000) PATH 'ReferenceId') x

XML:

<ns2:SearchResponseType xmlns:ns2="##default" xmlns="urn:com.xxx:xxx:xxx:1">

    <CbaNumber>29291618</CbaNumber>

    <ReferenceId>123459</ReferenceId>

</ns2:SearchResponseType>

This post has been answered by chris227 on Jun 8 2015
Jump to Answer

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 6 2015
Added on Jun 8 2015
2 comments
337 views