Home » Developer & Programmer » JDeveloper, Java & XML » I cannot extract xmlns value
I cannot extract xmlns value [message #479740] Tue, 19 October 2010 02:49 Go to next message
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 #479751 is a reply to message #479740] Tue, 19 October 2010 03:22 Go to previous messageGo to next message
Michel Cadot
Messages: 60018
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Could you provide a working test case we have not to rebuild one for each of your questions?
Also always post your Oracle version, with 4 decimals.

Regards
Michel

[Updated on: Tue, 19 October 2010 03:23]

Report message to a moderator

Re: I cannot extract xmlns value [message #479762 is a reply to message #479751] Tue, 19 October 2010 04:24 Go to previous message
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.
Previous Topic: How to extract namespace from XML document
Next Topic: JDeveloper - two problems
Goto Forum:
  


Current Time: Mon Dec 22 16:15:45 CST 2014

Total time taken to generate the page: 0.20287 seconds