xml = """
    <tree id="A"><anotherelement/></tree>
    <tree id="B"><yetanotherelement/></tree>
"""
fragments = html.fragments_fromstring(xml)
root = etree.Element('root')
lxml Create XML fragment with no root element?