When working with XML, you sometimes want to save some Text into the XML.
That can lead to problems when you use special Chars which then confuses the XML Parser.
To fix that you could just use multiple Replaces over your String or just use the .Net Function:
System.Security.SecurityElement.Escape
Example:
string myText = "Hello & World! <3"; string myTextXMLSafe = System.Security.SecurityElement.Escape(myText); // myTextXMLSafe is now "Hello & World! <3"