Writing lxml.etree with double quotes header attributes
To add the header without concatenate manually you need to use the "doctype" parameter in tostring method as bellow:
with open(output_file, 'wb') as o:
o.write(etree.tostring(
document_root, pretty_print=True,
doctype='<?xml version="1.0" encoding="ISO-8859-1"?>'
))