Space signs at the end of XML element values are removed by XMLTYPE() (Doc ID 473163.1)

Last updated on AUGUST 08, 2011

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 10.2.0.4 - Release: 10.2 to 10.2
Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 10.1.0.5   [Release: 10.1 to 10.1]
Oracle Server - Enterprise Edition - Version: 11.1.0.6 and later    [Release: 11.1 and later]
Information in this document applies to any platform.
Checked for Relevance on 30-Aug-2010

Symptoms

When trying to insert an XML files into an XMLtype table or column, blank signs at the end of
the element values are removed, so the XML files may become invalid.

Sample:
Following XML file has to be inserted (note that there is a space sign at the end of the value):

<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
  <ELEMENT>A </ELEMENT>
</ROOT>


During the insert, the space sign has been removed.
Due to this reduction, the XML file may become invalid if there is a restriction like "minLength value=2" in the underlying XML schema.



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