title: How to add new elements to existing XML
body: <p>I have this problem with XML in C#.
  I tried to add new elements to already existing .xml file with button, but when I click it nothing happens.</p>
  
  <p>This is the XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?&gt;
  &lt;Filmovi&gt;
    &lt;Film ID="1"&gt;
      &lt;Ime&gt;Deadpool 2&lt;/Ime&gt;
      &lt;DatumPrikazivanja&gt;08-06-2018&lt;/DatumPrikazivanja&gt;
      &lt;VrijemePrikazivanja&gt;21:30&lt;/VrijemePrikazivanja&gt;
      &lt;Trajanje&gt;119 min&lt;/Trajanje&gt;
      &lt;Redatelj&gt;David Leitch&lt;/Redatelj&gt;
      &lt;GlavniGlumci&gt;Ryand Reynolds, Josh Brolin&lt;/GlavniGlumci&gt;
      &lt;Opis&gt;Foul-mouthed mutant mercenary Wade Wilson (AKA. Deadpool), brings together a team of fellow mutant rogues to protect a young boy with supernatural abilities from the brutal, time-traveling cyborg, Cable. &lt;/Opis&gt;
      &lt;PosterLink&gt; E:kinoapp/posteri/deadpoolposter.jpg &lt;/PosterLink&gt;
    &lt;/Film&gt;
  &lt;/Filmovi&gt;
  </code></pre>
  
  <p>This is the code I tried.</p>
  
  <pre><code>private void dodajGumb_Click(object sender, EventArgs e)
          {
              XDocument doc = XDocument.Load(@"E:\kinoapp\xml\filmovi.xml");
              doc.Element("Filmovi").Add(
                      new XElement("Film", new XAttribute("ID", IDtext.Text),
                      new XElement("Ime", imeText.Text),
                      new XElement("DatumPrikazivanja", datum.Value.ToString("dd-MM-yyyy")),
                      new XElement("VrijemePrikazivanja", vrijemeText.Text),
                      new XElement("Trajanje", trajanjeText.Text),
                      new XElement("Redatelj", redateljText.Text),
                      new XElement("GlavniGlumci", glumciText.Text),
                      new XElement("Opis", opisText.Text),
                      new XElement("PosterLink", Convert.ToString(posterText.Text))
              ));
  
              doc.Save("filmovi.xml"); 
  
          }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/YPS9q.png" rel="nofollow noreferrer">picture of a form</a><a href="https://i.stack.imgur.com/59M2G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/59M2G.png" alt="enter image description here"></a></p>
  
  <p>I don't get any errors or anything, it's just that nothing adds to the XML file. Any advice?</p>