Re: valid node xmlparser oracle 10g
Date: Tue, 03 Nov 2009 01:35:24 +0000
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
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:
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.
> SQL> select
> d.xml_data.extract('/n1:submit').getClobVal() omdata
> from miketest.om_order_load d 2 3 ;
> ORA-31011: XML parsing failed
> ORA-19202: Error occurred in XML processing
> LPX-00601: Invalid token in: '/n1:submit'
> ORA-06512: at "SYS.XMLTYPE", line 111
> I have loaded another test file without the colons and I get back data,
> so I’m thinking the : is not valid. We are very downstream from the data
> and don’t have insight or a say in how they give us the data until it
> goes prod, so we’re not sure if this is just dummy data or how we’ll
> actually get it.