66296Parsing SVG in python
- Jan 13, 2014Hi all,
Is it possible to parse SVG in python? I was trying to use the following
code and not getting any output.
import xml.etree.cElementTree as ET
import xml.etree.ElementTree as ET
tree = ET.ElementTree(file='plan.svg')
for elem in tree.iter(tag='rect'):
print elem.tag, elem.attrib
The plan.svg file is at:
I have tried the above code with regular xml and the code works.
- Next post in topic >>