Go to the FreeLists Home Page Home Signup Help Login
 



[oracle-l] || [Date Prev] [12-2005 Date Index] [Date Next] || [Thread Prev] [12-2005 Thread Index] [Thread Next]

extracting xml tag name

  • From: "Shay Toder" <shayt@xxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 5 Dec 2005 12:07:29 +0200
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
---
<B>2</B>
<C>3</C>
<D>4</D>

value
-----
2
3
4

tag
---
B
C
D

Thanks,
Shay
--
http://www.freelists.org/webpage/oracle-l






[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.