Quick Way to Escape Special Characters in an XML Document
We can use the SecurityElement’s Escape method of the System.Security namespace to escape all the special characters in an XML file. Code snippet below: string escapedstring = System.Security.SecurityElement.Escape(inputXMLString); …inputXMLString ?contains