etree get root code example Example: python elementtree load from string from xml.etree.ElementTree import XML, fromstring myxml = fromstring(text)