How to escape Special character in XML
Hi All,I have XML data in string and tried to convert that string in to XML using
XmlDocument xl=new XmlDocument();
xl.LoadXml(mystring);
It was not parsing because my string has special character in xml element like below.
<ROOT>
<SUB>
<DATA>name < lastname</DATA>
<DATA>Myname > lastname</DATA>
<DATA>some special character in between text</DATA>
......
.....
</ROOT>
</SUB>
There were many <DATA> in my xml. It was generating dynamically.
I have tried to change < < > > but it was replacing other XML tags.
How to escape above special character without change other XML tags ?
Please help me to resolve this