title: Setting InnerXml for XmlDocument causes missing End-Tag
body: <pre><code>        XmlDocument doc = new XmlDocument();
          doc.AppendChild(doc.CreateElement("Foo"));
          doc.DocumentElement.InnerXml = "Test";      
          StringBuilder result = new StringBuilder();
          doc.WriteContentTo(XmlWriter.Create(result));
  </code></pre>
  
  <p>At the end, result is:</p>
  
  <pre><code>&lt;Foo&gt;Test
  </code></pre>
  
  <p>that means the end element is missing. Why is that and how can I fix it?</p>