CSharp examples for System.Xml:XML String
Encode Xml
// Licensed under the same terms of ServiceStack: new BSD license. using System.Text; using System.Linq; using System.Collections.Generic; using System;//from w w w . j a v a2 s .c o m public class Main{ public static string EncodeXml(this string value) { return value.Replace("<", "<").Replace(">", ">").Replace("&", "&"); } }