I’m trying to put <!CDATA> in a specific tag in my XML file, but the result is <![CDATA[mystring]]>
Someone can help me ?
The encoding
XmlProcessingInstruction pi = doc.CreateProcessingInstruction("xml", "version=\"1.0\" encoding=\"utf-8\"");
How I’m doing
texto.InnerText = "<![CDATA[" + elemento.TextoComplementar.ToString() + "]]>";
InnerTextperforms whatever escaping is required.If you want to work with
CDATA nodethen: