I am trying to build an XML document in C# with CDATA to hold the text inside an element. For example..
<email>
<![CDATA[[email protected]]]>
</email>
However, when I get the InnerXml property of the document, the CDATA has been reformatted so the InnerXml string looks like the below which fails.
<email>
<![CDATA[[email protected]]]>
</email>
How can I keep the original format when accessing the string of the XML?
Cheers