title: Read XML file in Python, search for key in a line and replace value
body: <p>I have an XML file that looks like this!</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
   &lt;root&gt;    
    &lt;child&gt;    
     &lt;add key="setid" value=".\print\data1" /&gt;    
      &lt;add key="getid" value=".\print\data2" /&gt;    
      &lt;add key="holdingid" value=".\print\data3" /&gt;    
     &lt;/child&gt;    
   &lt;/root&gt;
  </code></pre>
  
  <p>I want to read a line in the XML, search for a key match and replace a value in that line with <code>.\donotpritnnt\data1</code></p>
  
  <p>I can do this in NANT using XMLPOKE and xpath.
  Tried this with dict, list (replacing with positionID), split (not good enough code to show here)</p>
  
  <p>How can I solve this?</p>