My Oracle Support Banner

Incorrect Extraction Of The Xml Data (Doc ID 1273886.1)

Last updated on AUGUST 04, 2018

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

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
  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.