for node in tree:
if node.text and node.text.startswith('|Operation'):
# Strip first and last |
- updates = [x[1:len(x)-1].split('|') for x in
- ET.tostring(node,method='text').splitlines()]
+ updates = [x[1:len(x) - 1].split('|') for x in
+ ET.tostring(node, method='text').splitlines()]
for update in updates[2:]:
output = re.match('Operation (\d+): {(.*)}', update[0])
if output:
# print ET.tostring(node, method='text')
+
if __name__ == '__main__':
import sys