title: ElementTree XML to do proper spacing and indentation
body: <p>If I have a file like so for example:</p>
  
  <pre><code>&lt;data&gt;
      &lt;country name="Liechtenstein"&gt;
          &lt;rank&gt;1&lt;/rank&gt;
          &lt;year&gt;2008&lt;/year&gt;
          &lt;gdppc&gt;141100&lt;/gdppc&gt;
          &lt;neighbor direction="E" name="Austria" /&gt;
          &lt;neighbor direction="W" name="Switzerland" /&gt;
      &lt;/country&gt;
  &lt;/data&gt;
  </code></pre>
  
  <p>And if I append an element:</p>
  
  <pre><code>newTagContentString = """
  &lt;usertype id="99999"&gt;
      &lt;role name="admin" /&gt;
  &lt;/usertype&gt;"""
  c.append(newXMLElement)
  </code></pre>
  
  <p>It isn't properly indentated:</p>
  
  <pre><code>&lt;data&gt;
      &lt;country name="Liechtenstein"&gt;
          &lt;rank&gt;1&lt;/rank&gt;
          &lt;year&gt;2008&lt;/year&gt;
          &lt;gdppc&gt;141100&lt;/gdppc&gt;
          &lt;neighbor direction="E" name="Austria" /&gt;
          &lt;neighbor direction="W" name="Switzerland" /&gt;
      &lt;/country&gt;
  &lt;usertype id="99999"&gt;
      &lt;role name="admin" /&gt;
  &lt;/usertype&gt;&lt;/data&gt;
  </code></pre>
  
  <p>Is there a way to make it properly indentate?</p>
  
  <p>BTW <code>c.insert(0, newXMLElement)</code> also doesn't keep nice spacing: </p>
  
  <pre><code>&lt;data&gt;
      &lt;usertype id="99999"&gt;
      &lt;role name="admin" /&gt;
  &lt;/usertype&gt;&lt;country name="Liechtenstein"&gt;
          &lt;rank&gt;1&lt;/rank&gt;
          &lt;year&gt;2008&lt;/year&gt;
          &lt;gdppc&gt;141100&lt;/gdppc&gt;
          &lt;neighbor direction="E" name="Austria" /&gt;
          &lt;neighbor direction="W" name="Switzerland" /&gt;
      &lt;/country&gt;
  &lt;/data&gt;
  </code></pre>