title: How to get XML with header (<?xml version="1.0"...)?
body: <p>Consider the following simple code which creates an XML document and displays it.</p>
  
  <pre><code>XmlDocument xml = new XmlDocument();
  XmlElement root = xml.CreateElement("root");
  xml.AppendChild(root);
  XmlComment comment = xml.CreateComment("Comment");
  root.AppendChild(comment);
  textBox1.Text = xml.OuterXml;
  </code></pre>
  
  <p>it displays, as expected:</p>
  
  <pre><code>&lt;root&gt;&lt;!--Comment--&gt;&lt;/root&gt;
  </code></pre>
  
  <p>It doesn't, however, display the </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;   
  </code></pre>
  
  <p>So how can I get that as well?</p>