title: how to replace elements in xml using python
body: <p>sorry for my poor English. but i need your help  ;( </p>
  
  <p>i have 2 xml files.</p>
  
  <p>one is:</p>
  
  <pre><code>&lt;root&gt;
  &lt;data name="aaaa"&gt;
  &lt;value&gt;"old value1"&lt;/value&gt;
  &lt;comment&gt;"this is an old value1 of aaaa"&lt;/comment&gt;
  &lt;/data&gt;
  &lt;data name="bbbb"&gt; 
  &lt;value&gt;"old value2"&lt;/value&gt;
  &lt;comment&gt;"this is an old value2 of bbbb"&lt;/comment&gt;
  &lt;/data&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>two is:</p>
  
  <pre><code>&lt;root&gt;
  &lt;data name="aaaa"&gt;
  &lt;value&gt;"value1"&lt;/value&gt;
  &lt;comment&gt;"this is a value 1 of aaaa"&lt;/comment&gt;
  &lt;/data&gt;
  &lt;data name="bbbb"&gt; 
  &lt;value&gt;"value2"&lt;/value&gt;
  &lt;comment&gt;"this is a value2 of bbbb"&lt;/comment&gt;
  &lt;/data&gt;
  &lt;data name="cccc"&gt; 
  &lt;value&gt;"value3"&lt;/value&gt;
  &lt;comment&gt;"this is a value3 of cccc"&lt;/comment&gt;
  &lt;/data&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>one.xml will be updated from two.xml.</p>
  
  <p>so, the one.xml should be like this.</p>
  
  <p>one.xml(after) :</p>
  
  <pre><code>&lt;root&gt;
  &lt;data name="aaaa"&gt;
  &lt;value&gt;"value1"&lt;/value&gt;
  &lt;comment&gt;"this is a value1 of aaaa"&lt;/comment&gt;
  &lt;/data&gt;
  &lt;data name="bbbb"&gt; 
  &lt;value&gt;"value2"&lt;/value&gt;
  &lt;comment&gt;"this is a value2 of bbbb"&lt;/comment&gt;
  &lt;/data&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>data name="cccc" is not exist in one.xml. therefore ignored.</p>
  
  <p>actually what i  want to do is </p>
  
  <ol>
  <li>download two.xml(whole list) from db</li>
  <li>update my one.xml (it contains DATA-lists that only the app uses) by two.xml</li>
  </ol>
  
  <p>Any can help me please !! 
  Thanks!!</p>
  
  <p>==============================================================
  xml.etree.ElementTree<br>
  your code works with the example. but i found a problem in real xml file.</p>
  
  <p>the real one.xml contains :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;root&gt;
      &lt;resheader name="resmimetype"&gt;
          &lt;value&gt;text/microsoft-resx&lt;/value&gt;
      &lt;/resheader&gt;
      &lt;resheader name="version"&gt;
          &lt;value&gt;2.0&lt;/value&gt;
      &lt;/resheader&gt;
      &lt;resheader name="reader"&gt;
          &lt;value&gt;System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/value&gt;
      &lt;/resheader&gt;
      &lt;resheader name="writer"&gt;
          &lt;value&gt;System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/value&gt;
      &lt;/resheader&gt;
  
      &lt;data name="NotesLabel" xml:space="preserve"&gt;
          &lt;value&gt;Hinweise:&lt;/value&gt;
          &lt;comment&gt;label for input field&lt;/comment&gt;
      &lt;/data&gt;
      &lt;data name="NotesPlaceholder" xml:space="preserve"&gt;
          &lt;value&gt;z . Milch kaufen&lt;/value&gt;
          &lt;comment&gt;example input for notes field&lt;/comment&gt;
      &lt;/data&gt;
      &lt;data name="AddButton" xml:space="preserve"&gt;
          &lt;value&gt;Neues Element hinzufügen&lt;/value&gt;
          &lt;comment&gt;this string appears on a button to add a new item to the list&lt;/comment&gt;
      &lt;/data&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>it seems, resheader causes trouble.
  do you have any idea to fix? </p>