Tutorial by Examples: elementtree

Import the ElementTree object, open the relevant .xml file and get the root tag: import xml.etree.ElementTree as ET tree = ET.parse("yourXMLfile.xml") root = tree.getroot() There are a few ways to search through the tree. First is by iteration: for child in root: print(child.ta...

Page 1 of 1