doc = impl.createDocument(None, 'root', None)
for s in [XML1, XML2]:
    elem = minidom.parseString(s).firstChild
doc.firstChild.appendChild(elem)
print(doc.toxml())
python and XML: how to place two documents into a single document