I cannot extract xmlns value [message #479740] |
Tue, 19 October 2010 02:49 |
czinsou
Messages: 23 Registered: August 2009
|
Junior Member |
|
|
Hi, I am trying to get xmlns value from xmltable :
<InvoiceTransmission xmlns="http://www.IATA.com">
...
</InvoiceTransmission">
XQuery is :
SELECT a.xmlns FROM XMLT,
XMLTABLE('/InvoiceTransmission'
PASSING XMLT.data COLUMNS
xmlns VARCHAR2(50) PATH '@xmlns'
)a;
But I have no rows returned !
Please , someone have the solution ?
|
|
|
|
Re: I cannot extract xmlns value [message #479762 is a reply to message #479751] |
Tue, 19 October 2010 04:24 |
czinsou
Messages: 23 Registered: August 2009
|
Junior Member |
|
|
OK my oracle version is :
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
That's the query rebuild :
WITH xmlt AS
(SELECT xmltype(
'<InvoiceTransmission xmlns="http://www.IATA.com">
<data>info</data>
</InvoiceTransmission>'
) data FROM dual)
SELECT xmlns FROM XMLT,
XMLTABLE('/InvoiceTransmission'
PASSING XMLT.data COLUMNS
xmlns VARCHAR2(50) PATH '@xmlns'
)
I would like to get the value of xmlns (http://www.IATA.com) but I still have no rows returned.
How can I get that ?
Thanks for your help.
|
|
|