title: replace only first occurrence of field/word on a file
body: <p>I have some zipfiles ( 700+ ) with the following structure ( the file is exactly like this ) </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Values version="2.0"&gt;
  &lt;record name="trigger"&gt;
      &lt;value name="uniqueId"&gt;6xjUCpDlrTVHRsEVmxx0Ews6ni8=&lt;/value&gt;
      &lt;value name="processingSuspended"&gt;false&lt;/value&gt;
      &lt;value name="retrievalSuspended"&gt;false&lt;/value&gt;
  &lt;/record&gt;
  &lt;record name="trigger"&gt;
      &lt;value name="uniqueId"&gt;6xjUCpDlrTVHRsEVmxx0Ews6ni8=&lt;/value&gt;
      &lt;value name="processingSuspended"&gt;false&lt;/value&gt;
      &lt;value name="retrievalSuspended"&gt;false&lt;/value&gt;
  &lt;/record&gt;
  &lt;/Values&gt;
  </code></pre>
  
  <p>What i would like to achieve, is to replace, no matter if the value of the first occurrence fields <strong>processingSuspended</strong> and <strong>retrievalSuspended</strong>  is true or false. to replace it to false.  But only for the first occurrence.</p>
  
  <p>EDIT:</p>
  
  <p>By request im adding what i have so far, where i can get the fields that i want, But. i believe there is a simplier way to do that.:</p>
  
  <pre><code>import os
  import zipfile
  import glob
  import time
  import re
  
  def main():
      rList = []
      for z in glob.glob("*.zip"):
          root = zipfile.ZipFile(z)
          for filename in root.namelist():
              if filename.find("node.ndf") &gt;= 0:
                  for line in root.read(filename).split("\n"):
                      if line.find("broker-trigger") &gt;= 0:
                          for iline in root.read(filename).split("\n"):
                              Values = dict()
                              #match Processing state
                              if iline.find("processingSuspended") &gt;= 0:
                                  mpr = re.search(r'(.*&gt;)(.*?)(&lt;.*)', 
                                                  iline, re.M|re.I)
                              #match Retrieval state
                              if iline.find("retrievalSuspended") &gt;= 0:
                                  mr = re.search(r'(.*&gt;)(.*?)(&lt;.*)', 
                                                 iline, re.M|re.I)
                                  Values['processingSuspended'] = mpr.group(2)
                                  Values['retrievalSuspended'] = mr.group(2)
                                  #print mr.group(2)
                                  rList.append(Values)
      print rList
  
  if __name__== "__main__":
      main()
  </code></pre>
  
  <p>Thanks in advance.</p>