If the following string is read and output using lxml, the umlauts are converted to entities.
import xml.etree.ElementTree as ET root = ET.fromstring("