1 public static string XMLEscape(string str) 2 { 3 return str.Replace("&", "&").Replace("<", "<").Replace(">", ">").Replace("\"", """).Replace("'", "'"); 4 }