Camilo Castilla
Camilo Castilla

Reputation: 25

PHP C14N() change characters inside CDATA

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?

Upvotes: 1

Views: 114

Answers (0)

Related Questions