Hi experts,
I'm using Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 and we are calling a SOAP service that is returning this hell of XML. It's all enclosed into a big CDATA:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<BotPlus2Response xmlns="http://xxxxxxxxx.com/">
<BotPlus2Result><![CDATA[<Registro><GTECONCOD>0</GTECONCOD><GTECONDES>PRODUCTOS SANITARIOS, DIAGNOSTICO IN VITRO, Y OTROS ARTICULOS</GTECONDES><GTECONPAD></GTECONPAD></Registro>
.....
<Registro><GTECONCOD>Z</GTECONCOD><GTECONDES>PRODUCTOS TRADICIONALES DE PLANTAS MEDICINALES</GTECONDES><GTECONPAD></GTECONPAD></Registro>
]]></BotPlus2Result>
</BotPlus2Response>
</soap:Body>
</soap:Envelope>
I'm reading this "XML" into a CLOB variable, removing CDATA, and converting it to XMLTYPE:
l_response_clob CLOB;
l_xml_response XMLTYPE;
....
l_response_clob := replace (l_response_clob,'<![CDATA[','');
l_response_clob := replace (l_response_clob,']]>','');
l_xml_response := xmltype.createxml(l_response_clob);
But when I check the value in the table I see all these conversions to ≶ and >
What am I doing wrong?
Thanks,
Jose.