XML Database (MOSC)

MOSC Banner

XMLTABLE with xmlnamespaces XPST0005 issue

edited Jun 4, 2012 7:59AM in XML Database (MOSC) 1 commentAnswered
Running Oracle 11.2.0.3 on Solaris.

Given the following XML:

<doc:document xmlns:doc="urn:su:abc:de:doc">

<titleList>

<title>

<value>Test</value>

</title>

</titleList>

</document>

and using the following query:

select X.*

from mytable,

        XMLTABLE(xmlnamespaces('urn:su:abc:de:doc' as "doc"),

        '$d/doc:document' passing docxml as "d"

       COLUMNS

         thetitle varchar2(50) PATH 'titleList/title/value') as X

I get the following error:

from mytable,

        *

ERROR at line 2:

ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name: (doc:document doc='urn:us:gov:ic:doc')

I don't understand why I get this error.  Can anyone help?  Thank you.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center