Is parsing XML really this ugly in python?
I have a very small XML file (22 lines) with 5 elements(?) and I only want
one value out of it.
This is the only way I can get the value I have found without using
regular expressions
from xml.dom.minidom import parse
float(parse(filePath).getElementsByTagName('InfoType')[0].getElementsByTagName('SpecificInfo')[0].firstChild.data)
I feel like I'm missing something. There has to be a more pythonic way to
handle XML, right?
No comments:
Post a Comment