using System.IO; using System.Xml;
StringWriter s = new StringWriter(); XmlTextWriter w = new XmlTextWriter(s); w.WriteString(inputText); string result = s.ToString();
public static string XmlEncode(string input) { input = input.Replace("&", "&"); input = input.Replace("\"", """); input = input.Replace("'", "'"); input = input.Replace("<", "<"); input = input.Replace(">", ">"); return input; }
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.