I need to add CDATA to xml string for sign it with certificate.
String looks like:
<SignedContent>someparametres</SignedContent>
Result must be like:
<![CDATA[<SignedContent>someparametres</SignedContent>]]>
How can i do this? Pls help
P.S. Xml string has only one row (removed all tabs, all spaces, BOM)
It sounds like you just want:
Node cdata = doc.createCDATASection(text);
parentElement.appendChild(cdata);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With