title: How to prevent xml.ElementTree fromstring from dropping commentnode
body: <p>I have tho following code fragment:</p>
  
  <pre><code>    from xml.etree.ElementTree import fromstring,tostring
      mathml = fromstring(input)
      for elem in mathml.getiterator():
          elem.tag = 'm:' + elem.tag
      return tostring(mathml)
  </code></pre>
  
  <p>When i input the following <code>input</code>:</p>
  
  <pre><code>&lt;math&gt;
    &lt;a&gt; 1 2 3 &lt;/a&gt;  &lt;b /&gt;
  &lt;foo&gt;Uitleg&lt;/foo&gt;
  &lt;!-- &lt;bar&gt; --&gt;
  &lt;/math&gt;
  </code></pre>
  
  <p>It results in:</p>
  
  <pre><code>&lt;m:math&gt;
    &lt;m:a&gt; 1 2 3 &lt;/m:a&gt;  &lt;m:b /&gt;
  &lt;m:foo&gt;Uitleg&lt;/m:foo&gt;
  
  &lt;/m:math&gt;
  </code></pre>
  
  <p>How come? And how can I preserve the comment?</p>
  
  <p><strong>edit</strong>: I don't care for the exact xml library used, however, I should be able to do the pasted change to the tags. Unfortunately, lxml does not seem to allow this (and I cannot use proper namespace operations)</p>