I would like to find a better way to do this:
XmlNode nodeXML = xmlDoc.AppendChild( xmlDoc.CreateXmlDeclaration( "1.0", "utf-8", String.Empty) );
I do not want to think about โutf-8โ versus โUTF-8โ versus โUTF8โ and โutf8โ when I type in the code. I would like to make my code less prone to typos. I'm sure some standard library declared "utf-8" as a const / readonly line. How can I find him? Also, what about "1.0"? I assume that major versions of XML have also been listed.
Thanks!
source share