示例#1
0
def xhtml_to_soup(doc):
    bs = BeautifulSoup()
    bs.feed(xhtml_to_html(DOCUMENT_TEMPLATE % doc))
    return bs
示例#2
0
def test_empty_element():
    assert xhtml_to_html(DOCUMENT_TEMPLATE % '<br />').find('<body><br></body>') > -1