Trisurf Monte Carlo simulator
Samo Penic
2016-05-18 354145cb4c260bdd7ef3dafcdae206e2d00d4d3a
python/parse_vtu.py
@@ -1,10 +1,18 @@
#!/usr/bin/python3
import xml.etree.ElementTree as ET
import base64
import zlib
tree = ET.parse('../src/timestep_000000.vtu')
root = tree.getroot()
trisurf=root.find('trisurf')
version=root.find('trisurfversion')
print(version.text);
print(trisurf.items())
#xml=zlib.decompress(base64.b64decode(trisurf.text))
#xml=trisurf.text
#print(xml)
#tree2=ET.ElementTree(ET.fromstring(str(xml))
#tree2=ET.ElementTree(ET.fromstring("<root>"+str(xml)[0:-1]+"</root>"))