Escape XML Function

private string EscapeXml (string input) {
  string output = string.Empty;

  output = input.Replace("&", "&");
  output = output.Replace("'", "'");
  output = output.Replace("\"", """);
  output = output.Replace(">", ">");
  output = output.Replace("<", "<");
  return output;

Tagged with:
Posted in C#

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Antek Group Blog
%d bloggers like this: