summaryrefslogtreecommitdiffstats
path: root/onelinify.py
diff options
context:
space:
mode:
authorEduardo Pedroni <eduardo.pedroni@ch.abb.com>2019-03-07 12:16:21 +0000
committerEduardo Pedroni <eduardo.pedroni@ch.abb.com>2019-03-07 12:16:21 +0000
commitf4662f8a4191dc55138afd89625c236872b6ebf8 (patch)
treeb668a71ea04ee725ac3bc60df7f332b879911d18 /onelinify.py
Initial commit
Diffstat (limited to 'onelinify.py')
-rw-r--r--onelinify.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/onelinify.py b/onelinify.py
new file mode 100644
index 0000000..08bcb5a
--- /dev/null
+++ b/onelinify.py
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+
+import re
+import xml.etree.ElementTree
+
+ours = xml.etree.ElementTree.parse('ours.xml').getroot().find('events').findall('event')
+
+for e in ours:
+ p = xml.etree.ElementTree.tostring(e)
+ re.sub(r'\n', '', p)
+ print p