My Oracle Support Banner

Corrupted CLOB after DELETEXML when Origin CLOB Contains CRLF Characters and is Big (Doc ID 1589303.1)

Last updated on MARCH 10, 2019

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.


The result of DELETEXML is corrupted when there are CRLF (chr(13), chr(10)) characters in the XML document, specifically the elements are eliminated but
there are extra ones added to the document.

Therefore, getting the length of the CLOB obtained with getCLOBVal() returns a size which is much bigger than the original size, while it is expected a minor size.
For example, if the length of the original XML document was 113140, after DELETEXML its length becomes 1403881, which is surely wrong.

This happens only with big XML documents, in fact below code, which is using a small XML document, does not reproduce the issue:





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.