RE: valid node xmlparser oracle 10g

From: Michael McMullen <ganstadba_at_hotmail.com>
Date: Tue, 3 Nov 2009 08:13:45 -0500
Message-ID: <SNT115-DS256BDF92C6AE7FC96526ECA6B20_at_phx.gbl>



Thanks for the reply. A piece of the xml looks like this, looking at the documentation, it looks like you can add the namespaces to the extract or extractvalue but I couldn't get it to work, kept getting errors. I think I'll fire up an 11G db and see what I can work with. It looks like extract and extractvalue are deprecated in 11G. This xml is just a fragment the whole xml is 126K.

<n1:submit xmlns:n1 = "ca/joe/test/autotype/submitrequest" xmlns:xsi =
"http://www.w3.org/2001/XMLSchema-instance">

    <requestHeader xmlns = "ca/joe/test/autotype/submitrequest">

        <ns1:customerInteractionType xmlns:ns1 =
"ca/joe/test/autotype/testcommonrequest">ContactCentre</ns1:customerInteract
ionType>

        <ns2:serviceRequestUserId xmlns:ns2 =
"ca/joe/test/autotype/testcommonrequest">N296922</ns2:serviceRequestUserId>

        <ns3:serviceConsumer xmlns:ns3 =
"ca/joe/test/autotype/testcommonrequest">Odorrmax</ns3:serviceConsumer>

        <ns4:serviceRequestTimestamp xmlns:ns4 =
"ca/joe/test/autotype/testcommonrequest">2009-10-29T16:13:26.524-04:00</ns4:
serviceRequestTimestamp>

        <ns5:language xmlns:ns5 =
"ca/joe/test/autotype/testcommonrequest">English</ns5:language>

        <ns6:referenceID xmlns:ns6 =
"ca/joe/test/autotype/testcommonrequest">A26P83Z3</ns6:referenceID>

    </requestHeader>

-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Mark Weaver
Sent: Monday, November 02, 2009 8:35 PM
To: oracle-l_at_freelists.org
Subject: Re: valid node xmlparser oracle 10g

On 02/11/2009 4:57 PM, Michael McMullen wrote:

> Does anyone know offhand if nodes like "n1:submit" is valid in xml. All
> of our xml is changing that we parse to run reports on and our tests are
> saying
>

yes, they are valid -- they are called namespaces. There should be an xmlns attribute (usually at the start of the document, but it can be for individual elements), that declares the namespace, see:

http://www.w3.org/TR/REC-xml-names/

for the gory details. It might be simply that you are missing the namespace declaration -- you can usually provide these externally to parsers which is what the app that generates the data might be doing.

I've not checked that namespaces actually work with Oracle's xml parser, but I would think that they would as they are pretty fundamental.

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Nov 03 2009 - 07:13:45 CST

Original text of this message