title: creating xml document from string builder returns empty document
body: <p>Am trying to create am xml document using string builder as follows. string builder having the exact value as expected. but it does not write to the xml file. following is the code</p>
  
  <pre><code>mssql = "select ID, ParentID, OrderID, Title, Start, End, PercentComplete, Expanded, Summary From Project"
          Dim buildXML As New StringBuilder
          buildXML.Append("&lt;?xml version=""1.0"" encoding=""utf-8""?&gt;&lt;Project&gt;  &lt;Tasks&gt;")
          Dim mycommand As OdbcCommand
          mycommand = New OdbcCommand(mssql, dbcon)
          dbcon.Open()
          Dim reader As OdbcDataReader
          reader = mycommand.ExecuteReader
          While reader.Read
              buildXML.Append("&lt;Task&gt;" &amp; _
              "&lt;ID&gt;1&lt;/ID&gt;" &amp; _
              "&lt;ParentID /&gt;" &amp; _
              "&lt;Start&gt;" &amp; reader.Item("Start") &amp; "&lt;/Start&gt;" &amp; _
              "&lt;End&gt;" &amp; reader.Item("End") &amp; "&lt;/End&gt;" &amp; _
              "&lt;Title&gt;" &amp; reader.Item("Title") &amp; "&lt;/Title&gt;" &amp; _
              "&lt;PercentComplete&gt;" &amp; reader.Item("PercentComplete") &amp; "&lt;/PercentComplete&gt;" &amp; _
              "&lt;Summary&gt;" &amp; reader.Item("Summary") &amp; "&lt;/Summary&gt;" &amp; _
              "&lt;Expanded&gt;" &amp; reader.Item("Expanded") &amp; "&lt;/Expanded&gt;" &amp; _
              "&lt;OrderID&gt;" &amp; reader.Item("OrderID") &amp; "&lt;/OrderID&gt;" &amp; _
              "&lt;/Task&gt;")
          End While
          buildXML.Append("&lt;/Tasks&gt;  &lt;Dependencies /&gt;&lt;/Project&gt;")
          reader.Close()
          dbcon.Close()
  
          'everything work fine up to this 
  
          Dim XMLDocument As System.Xml.XmlDocument = New System.Xml.XmlDocument()
          XMLDocument.LoadXml(buildXML.ToString())
          Dim Output As New XmlTextWriter(Server.MapPath("~/App_Data/gantt.xml"), System.Text.Encoding.UTF8)
          XMLDocument.WriteTo(Output)
  </code></pre>
  
  <p>saving the document will result in empty document, does anyone know the reason?</p>