I am working with a large XML file that deals with localization of strings in C#. I did not write the program that produces the XML, but I have access to the source and I want to modify it, as it currently outputs 1.0 as the version, but it contains illegal characters in the document.
Here is how the code is currently written out.
XmlTextWriter xr = new XmlTextWriter(fileName, Encoding.UTF8);
xr.Formatting = Formatting.Indented;
xr.Indentation = 4;
xr.WriteStartDocument();
xr.WriteStartElement("tlkFile");
// ...
However the WriteStartDocument()
documentation states that it uses XML version 1.0. I know this does not work, because I am writing a java parser that modifies this XML, and it can't load because it has unicode characters that aren't allowed. Specifically 
which appears to be cancel. I'm not sure why this is here... the file is about 500000 lines long though.
I manually changed the header before my java parser grabbed it to 1.1, and it worked. Technically I could modify the XML as a string and then parse that, but I'd rather have proper XML instead.
I cannot find any way to change this. I can't really change the tool to use some other form of XML writing because it is a shared open source project that is used, and I'm not that great with C#.
Is there a trick to this?