Loading an XML file Fails with ORA-31061, ORA-19202, LPX-00210 when UTF8 Character Set is Used (Doc ID 1921476.1)

Last updated on JULY 26, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.3 to 12.1.0.2 [Release 11.2 to 12.1]
Oracle Database - Standard Edition - Version 11.2.0.4 to 11.2.0.4 [Release 11.2]
Information in this document applies to any platform.

Symptoms

Inserting an XML file into a binary XMLType column fails with the following error when the database character set is UTF8:

ORA-31061: XDB error: XML event error
ORA-19202: Error occurred in XML processing
In line 1 of orastream:
LPX-00210: expected '<' instead of '?'
ORA-06512: at line 11


The same file loads successfully if the database character set is WE8ISO8859P1.

The code being used is similar to the following:

 

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