I have a problem with ElementTree.iter().
So I tried this example in this link : http://eli.thegreenplace.net/2012/03/15/processing-xml-in-python-with-elementtree/
So here's what I've tried:
import elementtree.ElementTree as ET
tree = ET.parse('XML_file.xml')
root = tree.getroot()
for elem in tree.iter():
print elem.tag, elem.attrib
And I get this error AttributeError: ElementTree instance has no attribute 'iter'
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!