Before introducing data into XML clients, be it within tags or attributes of tags, it's important to escape all illegal XML characters that might break the validity of the XML. This can be easily done in C# using the Escape method.
1. string SafeXml = System.Security.SecurityElement.Escape("The string goes here...");