Use a wrapper around xml.etree.ElementTree.fromstring in python 2.x (#7178)