title: Appending an existing XML file with XmlWriter
body: <p>I've used the following code to create an XML file:</p>
  
  <pre><code>XmlWriterSettings xmlWriterSettings = new XmlWriterSettings();
  xmlWriterSettings.Indent = true;
  xmlWriterSettings.NewLineOnAttributes = true;
  using (XmlWriter xmlWriter = XmlWriter.Create("Test.xml", xmlWriterSettings))
  {
     xmlWriter.WriteStartDocument();
     xmlWriter.WriteStartElement("School");
     xmlWriter.WriteEndElement();
     xmlWriter.WriteEndDocument();
     xmlWriter.Close();
   }
  </code></pre>
  
  <p>I need to insert nodes dynamically creating the following structure:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;School /&gt;
     &lt;Student&gt;
        &lt;FirstName&gt;David&lt;/FirstName&gt;
        &lt;LastName&gt;Smith&lt;/LastName&gt;
     &lt;/Student&gt;
     ...
     &lt;Teacher&gt;
        &lt;FirstName&gt;David&lt;/FirstName&gt;
        &lt;LastName&gt;Smith&lt;/LastName&gt;
     &lt;/Teacher&gt;
     ...
  &lt;/School&gt;
  </code></pre>
  
  <p>How can I do it? The values of "FirstName" and "LastName" should be read from the keyboard and the values ​​can be entered at any time, of course under existing.</p>