title: Create an XML from items in an ObservableCollection
body: <p>I am trying to write to an xml file while looping through an observablecollection. I then want to pass the formatted xml to my model to have it write to the xml file. Here is what I have so far:</p>
  
  <pre><code>       public void SaveXml(string path)
      {
          XElement xml;
          foreach (var item in Cards)
          {
              xml = new XElement("Card",
                      new XAttribute("name", item.Name),
                      new XElement("Type", item.Type),
                      new XElement("Image",
                      new XAttribute("path", item.Image)),
                      new XElement("Usage", item.Usage),
                      new XElement("Quantity", item.Quantity),
                      new XElement("Sell", item.Sell)
                      );
          }
          Game.Model.Deck decks = new Game.Model.Deck();
          //decks.SaveXml("writetest.xml", xml);
  </code></pre>
  
  <p>With this, the XML file is replaced with each new node.. how do I make it so that it adds the new items to the same xml xelement to create a list of nodes to send to my model?</p>
  
  <p>Thanks in advance!</p>