title: How to modify the string after parse in an xml file?
body: <p>I'm new to python and I want to learn python language. I had trouble finding a solution for modifying string after parsed in an xml file.</p>
  
  <p><strong>This is the sample xml file:</strong></p>
  
  <pre><code>&lt;Celeb&gt;
    &lt;artist&gt;
      &lt;name&gt;Sammy Jellin&lt;/name&gt;
      &lt;age&gt;27&lt;/age&gt;
      &lt;bday&gt;01/22/1990&lt;/bday&gt;
      &lt;country&gt;English&lt;/country&gt;
      &lt;sign&gt;Virgo&lt;/sign&gt;
    &lt;/artist&gt;
  &lt;/Celeb&gt;
  </code></pre>
  
  <p><strong>Here is the code:</strong></p>
  
  <pre><code>def edit_f():
  # Get the 3rd attribute 
      root = ET.parse('test_file/test_file.xml').getroot()
      subroot = root.getchildren()
      listchild = subroot.getchildren()[2].text
      print(listchild)
  
  # Update the string for the &lt;bday&gt;
      replaceStr = listchild.replace('01/22/1990', '01/22/1992')
  
  def main():
      edit_f()
  </code></pre>
  
  <p><strong>End</strong></p>
  
  <p>How can I update the date?  I also tried using the datetime() but no good.</p>
  
  <p>Thank you for your help.</p>