title: Linq to XML Add element to specific sub tree
body: <p>My XML:</p>
  
  <pre><code>&lt;Bank&gt;
   &lt;Customer id="0"&gt;
    &lt;Accounts&gt;
     &lt;Account id="0" /&gt;
     &lt;Account id="1" /&gt;                      
    &lt;/Accounts&gt;
   &lt;/Customer&gt;
   &lt;Customer id="1"&gt;
    &lt;Accounts&gt;
     &lt;Account id="0" /&gt;                    
     &lt;/Accounts&gt;
   &lt;/Customer&gt;
   &lt;Customer id="2"&gt;
    &lt;Accounts&gt;
     &lt;Account id="0" /&gt;                    
    &lt;/Accounts&gt;
   &lt;/Customer&gt;
  &lt;/Bank&gt;
  </code></pre>
  
  <p>I want to add new Account element to lets say Customer with id 2. I know how to add the line what I dont know how do I specify the customer (where do I write the Customer's ID ?) </p>
  
  <p>My LINQ to XML code:</p>
  
  <pre><code>XDocument document = XDocument.Load("database.xml");
  document.Element("Bank").Element("Customer").Element("Accounts").Add
       (
           new XElement
               (
                   "Account", new XAttribute("id", "variable")
               )
        );
  document.Save("database.xml");
  </code></pre>
  
  <p>Thanks for the help. XML is not my good friend :(</p>