Package lxml :: Package html :: Module ElementSoup
[frames] | no frames]

Module ElementSoup

source code

Legacy interface to the BeautifulSoup HTML parser.
Functions
 
convert_tree(beautiful_soup_tree, makeelement=None)
Convert a BeautifulSoup tree to a list of Element trees.
source code
 
parse(file, beautifulsoup=None, makeelement=None) source code
Function Details

convert_tree(beautiful_soup_tree, makeelement=None)

source code 

Convert a BeautifulSoup tree to a list of Element trees.

Returns a list instead of a single root Element to support HTML-like soup with more than one root element.

You can pass a different Element factory through the makeelement keyword.