xmltype(regexp_replace(to_clob ..)) fails with ORA-31011, ORA-19213, LPX-00217

(Doc ID 2421516.1)

Last updated on JULY 10, 2018

Applies to:

Oracle Database - Enterprise Edition - Version and later
Information in this document applies to any platform.


On, xmltype(regexp_replace(to_clob ..)) fails with the following error:

ORA-31011: XML parsing failed
ORA-19213: error occurred in XML processing at lines 1
LPX-00217: invalid character 12 (U+000C)


Statement that fails:

SELECT xmltype(regexp_replace(to_clob('<foo>&#xc;</foo>'), '&#xc;', '')) FROM dual;

This works in 11.2 and 12.1.


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