'Removes this element from the tree, including its children and
text.  The tail text is joined to the previous element or
parent.'

def drop_tree(self):

    parent = self.getparent()
    assert (parent is not None)
    if self.tail:
        previous = self.getprevious()
        if (previous is None):
            parent.text = ((parent.text or '') + self.tail)
        else:
            previous.tail = ((previous.tail or '') + self.tail)
    parent.remove(self)
