From 67ebc111219852ae6d0246d34bf3c7d459cc24f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kn=C3=BCttel?= Date: Thu, 6 Dec 2018 12:29:30 +0100 Subject: [PATCH] added ex25 --- ex_25.py | 8 ++++++++ python_class.xml | 1 + 2 files changed, 9 insertions(+) create mode 100644 ex_25.py create mode 100644 python_class.xml diff --git a/ex_25.py b/ex_25.py new file mode 100644 index 0000000..f9d307c --- /dev/null +++ b/ex_25.py @@ -0,0 +1,8 @@ +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) + + diff --git a/python_class.xml b/python_class.xml new file mode 100644 index 0000000..5d62c7f --- /dev/null +++ b/python_class.xml @@ -0,0 +1 @@ +StefanounknownJonathan192572463Susan214172463Dennis224176963 \ No newline at end of file