change xml element text using xml.etree.ElementTree
<p>Given a parsed xml string:</p>

<pre><code>tree = xml.etree.ElementTree.fromstring(xml_string)
</code></pre>

<p>How would you change an element's text from 'hats': </p>

<pre><code>&gt;&gt;&gt; tree.find("path/to/element").text
&gt;&gt;&gt; 'hats'
</code></pre>

<p>to 'cats'?</p>