When I run
from xml.etree import ElementTree
tree = ElementTree.fromstring('<foo bar=""baz=""></foo>')
I get
xml.etree.ElementTree.ParseError
: not well-formed (invalid token): line 1, column 11
This is due to the lack of space between ""
and baz
.
I'm encountering this problem in XML files provided to me by a third party.
Is there any way to make ElementTree
be a little less pedantic about the spacing and parse it as if there was a space?