title: There are multiple root elements. Line 1, position 21. XML Error
body: <p>Getting an Error in my Code Here is the Loading Function:</p>
  
  <p>This is the Error: There are multiple root elements. Line 1, position 21</p>
  
  <p>I was hoping someone could guide me in the right direction. </p>
  
  <pre><code>private void button11_Click(object sender, EventArgs e)
          {
  
              XmlTextReader reader = new XmlTextReader("text1.xml");
              XmlNodeType type;
  
  
  
   while (reader.Read())
              {
                  type = reader.NodeType;
  
                  if (type == XmlNodeType.Element)
                  {
                      if (reader.Name == "Title")
                      {
                          reader.Read();
                          textBox12.Text = reader.Value;
                      }
  
  
                  }
  
                  while (reader.Read())
                  {
  
                      if (reader.Name == "Description")
                      {
                          reader.Read();
                          textBox11.Text = reader.Value;
                      }
  
                  }
              }
  </code></pre>
  
  <p>And this is the code that creates the XML File:</p>
  
  <pre><code>XmlTextWriter xWriter = new XmlTextWriter("text1.xml", Encoding.UTF8);
  
              xWriter.WriteStartElement("Tasks");
  
              xWriter.WriteStartElement("Title");
  
              xWriter.WriteString(textBox1.Text); //  textbox.text 
  
              xWriter.WriteEndElement(); // title
  
  
              xWriter.WriteStartElement("Description");
  
              xWriter.WriteString(textBox2.Text); //  textbox.text 
  
              xWriter.WriteEndElement(); // description end 
  
  
  
              xWriter.WriteStartElement("Date");
  
              string val = "10/10/2010";
              dateTimePicker1.Value = Convert.ToDateTime(val);
  
              xWriter.WriteString(val); //  textbox.text 
  
              xWriter.WriteEndElement(); // description end 
  
  
              xWriter.WriteEndElement(); // close tasks
  
  
  
              xWriter.Close();
  </code></pre>