XMLTABLE with xmlnamespaces XPST0005 issue
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.