Incorrect Extraction Of The Xml Data (Doc ID 1273886.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Server - Enterprise Edition - Version: 11.2.0.1 and later   [Release: 11.2 and later ]
Information in this document applies to any platform.

Symptoms


Xml extraction is not correct.

The query:

select XMLserialize(DOCUMENT
(select xmltype(COLUMN_NAME)
from TABLE_NAME
where PK_COLUMN=4860324) AS CLOB indent) from dual;

is introducing corruption:

<numeroNotificacaoMedicamento>oteMedicame</numeroNotificacaoMedicamento>

This query brings the correct output:

select XMLserialize(DOCUMENT
(select xmltype(replace(COLUMN_NAME,'xmlns="urn:sngpc-schema"',''))
from TABLE_NAME
where PK_COLUMN=4860324) AS CLOB indent) from dual;

<numeroNotificacaoMedicamento> </numeroNotificacaoMedicamento>

Workaround may or may not be feasible as sometimes the query cannot be modified.

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