data.attrib['ID'] = 'http://someurldata4'
data.text = 'data4'
doc.append(data)
etree.tostring(doc, xml_declaration=True)
etree.tostring(doc, xml_declaration=True, encoding='utf-8')
XML header getting removed after processing with elementtree