Output From Xmltable In 11g Shows Escaped And Should Be Non-Escaped (Doc ID 1328933.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Server - Enterprise Edition - Version: 11.1.0.7 to 11.2.0.2 - Release: 11.1 to 11.2
Information in this document applies to any platform.

Symptoms


The output from a SELECT using XML Functions in 11.2 returns escaped character entities

The character entity references are no longer translated in 11g

This output shows the different behavior in 10.2 than 11.2

The query is:

set define off
select *
from (xmltable ( 'testcase'
passing xmltype('<testcase node="example" value="Test &amp; &lt; &gt; &quot; &apos;"/>')
columns
node varchar2(20) path '@node',
text varchar2(100) path '@value')
)
where node='example';

Output in 10.2:

NODE
--------------------
TEXT
-----------------------------------------------------------------------------
---
example
Test & < > " '


Output in 11.1 and 11.2:

NODE
--------------------
TEXT
-----------------------------------------------------------------------------
---
example
Test & amp; & lt; & gt; & quot; & apos;

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms