When I used linq to retrieve xml, <CDATA[[
]]>
is removed, which is what I want to achieve.
But when I save the file, <CDATA[[
]]>
becomes <CDATA[[
]]>
in the xml file.
Whether or not I explicitly append with <CDATA[[
]]>
before saving gives me the same result.
Tried appending with <CDATA[[
]]>
but still gives me the same result.
Is there any other way to make it show <CDATA[[
]]>
in the xml file?
I'm using Encoding.UTF8.GetBytes()
to write to the file after saving the XDocument
using XDocument.Save(System.IO.StringWriter)
.