My Oracle Support Banner

XML Parsing Failed With ORA-31011, ORA-19213, LPX-00290: Invalid Use Of Xmlns As A Prefix (Doc ID 2615532.1)

Last updated on JANUARY 31, 2022

Applies to:

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


On 18.4, an XML query fails with the following error:

ORA-31011: XML parsing failed
ORA-19213: error occurred in XML processing at lines 2
LPX-00290: invalid use of xmlns as a prefix

Statement that fails:

select XMLTransform(XMLElement("XML", XMLElement("ROW",XMLAttributes('' as "namespace1" ,
  '' as "namespace2" ))), (select XMLType(xsl_template) from <table> 
  where <column> = 2642 )).getstringval() from dual

This statement executes successfully on


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.