title: Processing XML in Python with ElementTree
body: <p>I have a problem with ElementTree.iter(). </p>
  
  <p>So I tried this example in this link : <a href="http://eli.thegreenplace.net/2012/03/15/processing-xml-in-python-with-elementtree/" rel="nofollow">http://eli.thegreenplace.net/2012/03/15/processing-xml-in-python-with-elementtree/</a></p>
  
  <p>So here's what I've tried:</p>
  
  <pre><code>import elementtree.ElementTree as ET
  tree = ET.parse('XML_file.xml')
  root = tree.getroot()
  for elem in tree.iter():
      print elem.tag, elem.attrib
  </code></pre>
  
  <p>And I get this error AttributeError: ElementTree instance has no attribute 'iter'</p>
  
  <p>Additional info: The version of my Python is 2.4 I separately installed elementtree. Other examples in the link that I provide is working in my Python installed. Only the ElementTree.iter() is not working. Thanks in advance for all of your help. Cheers!</p>