scientific-programming-exer.../ex_25.py

9 lines
169 B
Python
Raw Normal View History

2018-12-06 11:29:30 +00:00
from defusedxml import ElementTree
with open("python_class.xml") as fin:
for i, node in enumerate(ElementTree.parse(fin).iter()):
print(node.tag, ":", node.text)