How to update text inside CDATA
I want to replace the text inside the cdata section, but when I just try to add text to it, I lose the CDATA definition.
I have XML like this:
<title><![CDATA[string]]></title>
When I try to update this field with a new value:
myXmlNode.SelectSingleNode("title").InnerText = TextBoxName.Text;
Exit
<title>string</title>
How can I save it as CDATA?
+1
a source to share
2 answers