title: Write xml file using lxml library in Python
body: <p>I'm using <a href="http://codespeak.net/lxml/tutorial.html" rel="noreferrer">lxml</a> to create an XML file from scratch;
  having a code like this:</p>
  
  <pre><code>from lxml import etree
  
  root = etree.Element("root")
  root.set("interesting", "somewhat")
  child1 = etree.SubElement(root, "test")
  </code></pre>
  
  <p>How do I write root <code>Element</code> object to an xml file using <code>write()</code> method of <code>ElementTree</code> class?</p>