title: How do I add a new node to the end of an existing XML file?
body: <p>How do I add a new node to the end of an existing XML file?</p>
  
  <p>I understand how, but how in the end? </p>
  
  <p>For example, I have the following XML file and need to add a new node "entry" to the end of the file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; 
  - &lt;entries&gt;
  - &lt;entry type="debit"&gt;
  &lt;amount&gt;100&lt;/amount&gt; 
  &lt;date&gt;11.11.2010&lt;/date&gt; 
  - &lt;description&gt;
  - &lt;![CDATA[ Описание записи]]&gt; 
  &lt;/description&gt;
  &lt;category&gt;Продукты&lt;/category&gt; 
  &lt;/entry&gt;
  - &lt;entry type="credit"&gt;
  &lt;amount&gt;50&lt;/amount&gt; 
  &lt;date&gt;11.11.2010&lt;/date&gt; 
  - &lt;description&gt;
  - &lt;![CDATA[ Описание записи]]&gt; 
  &lt;/description&gt;
  &lt;category&gt;Продукты&lt;/category&gt; 
  &lt;/entry&gt;
  - &lt;entry type="debit"&gt;
  &lt;amount&gt;100&lt;/amount&gt; 
  &lt;date&gt;11.11.2010&lt;/date&gt; 
  - &lt;description&gt;
  - &lt;![CDATA[ Описание записи]]&gt; 
  &lt;/description&gt;
  &lt;category&gt;Продукты&lt;/category&gt; 
  &lt;/entry&gt;
  &lt;/entries&gt; 
  </code></pre>