def convert_tree(beautiful_soup_tree, makeelement=None):
 root = _convert_tree(beautiful_soup_tree, makeelement)
 children = root.getchildren()
 for child in children:
  root.remove(child)
 return children

def convert_tree ( beautiful_soup_tree , makeelement = None ) : root = _convert_tree ( beautiful_soup_tree , makeelement ) children = root . getchildren ( ) for child in children : root . remove ( child ) return children
convert a beautifulsoup tree to a list of element trees .