Search notes:

Oracle XMLType: EXTRACT

The following query extracts text of the 6th n element (which is 8):
select
   xmlType('
     <nums>
       <n>1</n>
       <n>1</n>
       <n>2</n>
       <n>3</n>
       <n>5</n>
       <n>8</n>
       <n>13</n>
       <n>21</n>
     </nums>').extract('//n[6]/text()') as x
from
   dual;

See also

XMLType

Index