XML: remove child node of a node
<p>I want to find all nodes in a xml file that have a certain tag-name, lets say "foo".
If those foo-tags have them thelves child nodes with node-name "bar", then I want to remove those nodes. The result should be written to a file.</p>

<pre><code>&lt;myDoc&gt;
  &lt;foo&gt;
    &lt;bar/&gt; // remove this one
  &lt;/foo&gt;
  &lt;foo&gt;
    &lt;anyThing&gt;
      &lt;bar/&gt; // don't remove this one
    &lt;/anyThing&gt;
  &lt;/foo&gt;
&lt;/myDoc&gt; 
</code></pre>

<p>Thanx for any hints. As the tag indicates, I would like to do this with python.</p>
