This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To Get escapded values | |
public string EscapeXMLValue(string value) | |
{ | |
if (string.IsNullOrEmpty(s)) return s; | |
string temp = s; | |
temp = temp.Replace("'","'").Replace( "\"", """).Replace(">",">").Replace( "<","<").Replace( "&","&"); | |
return temp ; | |
} | |
To get the unescaped value | |
public string UnescapeXMLValue(string xmlValue) | |
{ | |
if (string.IsNullOrEmpty(s)) return s; | |
string temp = s; | |
temp = temp.Replace("'", "'").Replace(""", "\"").Replace(">", ">").Replace("<", "<").Replace("&", "&"); | |
return temp ; | |
} |