PHP C14N() change characters inside CDATA

101 Views Asked by At

I have an xml that I must sign, however when I send it it has a structure something like this:

<cbc:EncodingCode>UTF-8</cbc:EncodingCode>
<cbc:Description>
    <![CDATA[<ApplicationResponse xmlns="urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2".....

After passing it through the conocalization with C14N(), you are like this

<cbc:EncodingCode>UTF-8</cbc:EncodingCode>
<cbc:Description>
    &lt;ApplicationResponse xmlns="urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2"

Changing the characters < > by &gt; &lt; and remove <![CDATA[]]>

What do I do, help?

0

There are 0 best solutions below