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!

Hi All, I have a XML file and i am trying to get the field elements but unable to get it. It says xp

User_KIXOPAug 2 2017 — edited Aug 4 2017

Hi All, I have a XML file and i am trying to get the field elements but unable to get it. It says xpath not found.

XML file is like below

<ns0:LoadCardTransactions xmlns:ns1="http://www.pp.com/ifcs">

<ns1:Header>

           <ns2:FileName xmlns:ns2="http://www.pp.com/core">CardTransBase24_AU_0357.xml</ns2:FileName>

           <ns2:SequenceNumber xmlns:ns2="http://www.pp.com/core">0357</ns2:SequenceNumber>

           <ns2:RecordCount xmlns:ns2="http://www.pp.com/core">63</ns2:RecordCount>

           <ns2:CountryCode xmlns:ns2="http://www.pp.com/core">AU</ns2:CountryCode>

           <ns2:StartDate xmlns:ns2="http://www.pp.com/core">2017-07-20</ns2:StartDate>

           <ns2:StartTime xmlns:ns2="http://www.pp.com/core">00:00:45</ns2:StartTime>

           <ns2:Identifier xmlns:ns2="http://www.pp.com/core">Y</ns2:Identifier>

           <ns2:ExternalSupplier xmlns:ns2="http://www.pp.com/core">pp AU</ns2:ExternalSupplier>

           <ns2:SettlementDate xmlns:ns2="http://www.pp.com/core">2017-07-19</ns2:SettlementDate>

</ns1:Header>

</ns0:LoadCardTransactions>

I am trying to get FileName , but it says xpath not found.. I am using Oracle 12c.

   SELECT

    req.id,

    extractValue(

        req.content,

    '/ns1:LoadCardTransactions/ns1:Header/ns2:FileName/','xmlns:ns1="http://www.pp.com/ifcs" xmlns:ns2="http://www.pp.com/core"') Title

FROM

    SAP_PRICE_FILE_TBL1 req

Please help.

This post has been answered by cormaco on Aug 3 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 1 2017
Added on Aug 2 2017
4 comments
617 views