title: Empty lines while using minidom.toprettyxml
body: <p>I've been using a minidom.toprettyxml for prettify my xml file.
  When I'm creating XML file and using this method, all works grate, but if I use it after I've modified the xml file (for examp I've added an additional nodes) and then I'm writing it back to XML, I'm getting empty lines, each time I'm updating it, I'm getting more and more empty lines...</p>
  
  <p>my code :</p>
  
  <pre><code>file.write(prettify(xmlRoot))
  
  
  def prettify(elem):
      rough_string = xml.tostring(elem, 'utf-8') //xml as ElementTree
      reparsed = mini.parseString(rough_string) //mini as minidom
      return reparsed.toprettyxml(indent=" ")
  </code></pre>
  
  <p>and the result :</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;testsuite errors="0" failures="3" name="TestSet_2013-01-23 14_28_00.510935" skip="0"     tests="3" time="142.695" timestamp="2013-01-23 14:28:00.515460"&gt;
  
  
  
  
      &lt;testcase classname="TC test" name="t1" status="Failed" time="27.013"/&gt;
  
  
  
  
      &lt;testcase classname="TC test" name="t2" status="Failed" time="78.325"/&gt;
  
  
      &lt;testcase classname="TC test" name="t3" status="Failed" time="37.357"/&gt;
  &lt;/testsuite&gt;
  </code></pre>
  
  <p>any suggestions ?</p>
  
  <p>thanks.</p>