This is an unusual situation. We are forced to interface with a 3rd party who requires certain values in the xml response to be wrapped with even if it is just a string value.
Example: <Property name="someName" type="String"><![CDATA[someValue]]></Property>
We are adding these property nodes to the document as follows:
XPathExpression query = xPathNavigator.Compile(xpath);
XPathNavigator node = xPathNavigator.SelectSingleNode(query.Expression, xmlNamespaceManager);
string property = "<Property name='someName' type='String'><![CDATA[someValue]]></Property>";
node.AppendChild(property);
The problem is, the resulting xml looks like this
<Property name="someName" type="String">someValue</Property>
The CDATA keeps getting stripped out.