element xml python code example
Example 1: python string to xml
import xml.etree.ElementTree as ET
root = ET.fromstring(country_data_as_string)
Example 2: python elementtree load from string
from xml.etree.ElementTree import XML, fromstring
myxml = fromstring(text)