I'm having a bit of trouble writing to an xml file, but I keep getting stuck with illegal characters.
I have been trying to use the escape function (shown below)
string SafeXml = System.Security.SecurityElement.Escape("<?xml version="1.0"?>");
So using this, I'm passing in my string as you can see. However, the compiler gets confused because I'm giving it extra quotes. How do I get around this?
I must have the 1.0 surrounded in quotes in the XML, but I can't find an easy way to do this, can anyone help?
This post has been edited by Premier2k: 03 July 2009 - 03:25 PM