Skip to content
Advertisement

Delete xml node with a specific CDATA

This is part of my XML:

I need to delete the EO node with <![CDATA[0001FFFFFFFF]]>,across the table using Oracle. This xml is stored in XM_DATA_CACHE of XMLTYPE. Is there a way to delete based on CDATA

Final output should be

Advertisement

Answer

First of all your xml is broken: second tag GoalMeasurementEORow is not closed and also since that is just a part of xml, it has no root tag.

Anyway, I’ve fixed your xml to show how you can remove cdata from your xml.

Please look at the following example:

Results:

As you can see I’m replacing all child nodes EO with their content and CDATA disappears.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement