replace xml child element text with value from a list python
<p>I want to replace the text element of a child with a value held in a list. </p>

<pre><code>&lt;weighting name="weighting"&gt;
        &lt;aWeight&gt;false&lt;/aWeight&gt;
        &lt;cWeight&gt;true&lt;/cWeight&gt;
&lt;/weighting&gt;
</code></pre>

<p>I am trying to change the text value for aWeight to true. I have tried to do it with this code.</p>

<pre><code>elems = dom.findall('aWeight')
for elem in elems:
    if user_settings.new_settings[5] == 'true':
        '&lt;aWeight&gt;'.text = 'true'

dom.write('output.xml')
</code></pre>

<p>It's writing the file but the value is still staying at false. Does anyone have any suggestions.</p>