Oracle 11g. I figured out that if I add NOENTITYESCAPING
to the XMLELEMENT
function, it nicely turns off entity escaping. However, when I then pass the result to EXTRACT
the escaping seems to come back again.
select xmlelement(NOENTITYESCAPING e,id,'->')
from (select level as id
from dual
connect by level < 6)
XMLELEMENT(NOENTITYESCAPINGE,ID,'->')
---------------------------------------
<E>1-></E>
<E>2-></E>
<E>3-></E>
<E>4-></E>
<E>5-></E>
Now, adding EXTRACT
:
select xmlelement(NOENTITYESCAPING e,id,'->').extract('//text()')
from (select level as id
from dual
connect by level < 6)
XMLELEMENT(NOENTITYESCAPINGE,ID,'->').EXTRACT('//TEXT()')
----------------------------------------------------------
1->
2->
3->
4->
5->
Any fixes/workarounds to keep the escaping switched off? The manual gives no help.