Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> extracting xml tag name
hi,
how can i get the NAME of the XML node,
example -
SELECT EXTRACT (VALUE (e), '/').getstringval () as xml
, EXTRACTVALUE (VALUE (e), '/') as VALUE --, ??? as tag FROM TABLE (XMLSEQUENCE (EXTRACT ( XMLTYPE ('<A> <B>2</B> <C>3</C> <D>4</D> </A>' ), '/A/*'))) e
the result should be - (the first & second are ok, but how to get the third ?) -
xml
---Received on Wed Nov 30 2005 - 08:17:16 CST
<B>2</B>
<C>3</C>
<D>4</D>
value ----- 2 3 4 tag --- B C D Thanks, Shay