title: XML CDATA Encoding
body: <p>I am trying to build an XML document in C# with CDATA to hold the text inside an element. For example..</p>
  
  <pre><code>&lt;email&gt;
  &lt;![CDATA[test@test.com]]&gt;
  &lt;/email&gt;
  </code></pre>
  
  <p>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.</p>
  
  <pre><code>&lt;email&gt;
  &amp;lt;![CDATA[test@test.com]]&amp;gt;
  &lt;/email&gt;
  </code></pre>
  
  <p>How can I keep the original format when accessing the string of the XML?</p>
  
  <p>Cheers</p>