Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: extracting xml tag name
Shay
>how can i get the NAME of the XML node,
In XPath the fuction name() should be used for that. Unfortunately you cannot use it with extract()...
Here a workaround:
SQL> SELECT XMLType(extract(value(e),'/').getstringval()).getRootElement() AS xml 2 FROM TABLE (XMLSEQUENCE (EXTRACT (
3 XMLTYPE ('<A> 4 <B>2</B> 5 <C>3</C> 6 <D>4</D> 7 </A>' 8 ), '/A/*'))) e;
XML
HTH
Chris
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Dec 05 2005 - 13:39:35 CST
![]() |
![]() |