Hi! I have a simple xml file like this one:
<xml>
<check>
<a>b<</a>
<b>
<test>asdf</test>
</b>
<test>jj&j</test>
</check>
</xml>
I would like to "double escape" all special chars so it will result in &lt;
and &amp;
with a simple linq to xml statement. The xml should still be valid, only the values need to be escaped.
Anyone knows a solution for this?
The resulting xml should look like this:
<xml>
<check>
<a>b&lt;</a>
<b>
<test>asdf</test>
</b>
<test>jj&amp;j</test>
</check>
</xml>
Thanks in advance