My Oracle Support Banner

Xml Transformation Adds The Namespace Twice To The Root Element (Doc ID 1366323.1)

Last updated on APRIL 12, 2022

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.7 to 11.2.0.3 [Release 11.1 to 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 Backup Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

Using XMLtype.Transform(), the namespace attribute is added twice to the root element.

Code Example


This generates the following output in 11.1.0.7, 11.2.0.1 and 11.2.0.2:

<rootNode xmlns="http://www.europace.ie/xsd/" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      
     xmlns="http://www.europace.ie/xsd/"> 
  <testNode>hello World</testNode>
</rootNode>


while in 10.2.0.5 the output is correct

<rootNode xmlns="http://www.europace.ie/xsd/" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <testNode>hello World</testNode>
</rootNode>

 

Changes

 

Cause

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
Symptoms
Changes
Cause
Solution
References


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