ElementTree
Пример XML-файла:В составе стандартной библиотеки языка Python есть библиотека ElementTree.
from xml.etree import ElementTree tree = ElementTree.parse("example.xml") root = tree.getroot() # use root = ElementTree.fromstring(string_xml_data) to parse from str print(root) print(root.tag, root.attrib)