title: How to update XML file with lxml
body: <p>I want to update xml file with new information by using lxml library.
  For example, I have this code:</p>
  
  <pre><code>&gt;&gt;&gt; from lxml import etree
  &gt;&gt;&gt;
  &gt;&gt;&gt; tree = etree.parse('books.xml')
  </code></pre>
  
  <p>where 'books.xml' file, has this content: <a href="http://www.w3schools.com/dom/books.xml" rel="noreferrer">http://www.w3schools.com/dom/books.xml</a>  </p>
  
  <p>I want to update this file with new book:</p>
  
  <pre><code>&gt;&gt;&gt; new_entry = etree.fromstring('''&lt;book category="web" cover="paperback"&gt;
  ... &lt;title lang="en"&gt;Learning XML 2&lt;/title&gt;
  ... &lt;author&gt;Erik Ray&lt;/author&gt;
  ... &lt;year&gt;2006&lt;/year&gt;
  ... &lt;price&gt;49.95&lt;/price&gt;
  ... &lt;/book&gt;''')
  </code></pre>
  
  <p>My question is, how can I update <code>tree</code> element tree with <code>new_entry</code> tree and save the file.</p>