Corrupted CLOB after DELETEXML when Origin CLOB Contains CRLF Characters and is Big
Last updated on FEBRUARY 08, 2017
Applies to:Oracle Database - Enterprise Edition - Version 22.214.171.124 to 126.96.36.199 [Release 11.2]
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:
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms