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!

XML WITH namespace

pjsiong-JavaNetMar 17 2016 — edited Mar 18 2016

Hi,

I have a XML with below content

<Data

    xmlns="http://support.abve.com/misc/axml/2009/06/"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://support.aBC.com/misc/axml/2009/06/ http://support.agile.com/misc/axml/2009/06/">

    <AutomatedTransferOrders uniqueId="11761:81908511">

        <CoverPage>

            <AtoType>ATO</AtoType>

            <AtoNumber>ATO123345</AtoNumber>

            <Description>Created by subscriber Qual Sample Workflow Subscriber for Change Orders.</Description>

            <Status>Released</Status>

            <Workflow>Default ATOs</Workflow>

            <Subscriber>Qual Sample Workflow Subscriber for Change Orders</Subscriber>

            <DateOriginated>2016-03-14T02:33:28Z</DateOriginated>

            <DateReleased>2016-03-14T02:33:28Z</DateReleased>

        </CoverPage>

        <SelectedObjects referentId="6000:81908426">

            <Type>ECN</Type>

            <NameNumber>ECN-20932</NameNumber>

            <Description>TESTING ONLY</Description>

            <LifecycleStatus>Released, Awaiting Confirmation</LifecycleStatus>

        </SelectedObjects>

    </AutomatedTransferOrders>

</Data>   

when I try to extract some info using

select extract(xmltype(t.data),'/Data/AutomatedTransferOrders/CoverPage/AtoNumber/text()').getStringVal() from CUST_TEMP t

it will return null,

I have to remove the name space definition

xmlns="http://support.abve.com/misc/axml/2009/06/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://support.aBC.com/misc/axml/2009/06/ http://support.agile.com/misc/axml/2009/06/"

to get the info.

Is that the limitation in Oracle XML ?

Thanks

Vincent

This post has been answered by pjsiong-JavaNet on Mar 18 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 15 2016
Added on Mar 17 2016
2 comments
2,058 views