(data, html=True, **kwargs)
Print out the lxml events that occur during parsing.

    This lets you see how lxml parses a document when no Beautiful
    Soup code is running.
Print out the lxml events that occur during parsing.
Print out the lxml events that occur during parsing .
def lxml_trace(data, html=True, **kwargs):
    """Print out the lxml events that occur during parsing.

    This lets you see how lxml parses a document when no Beautiful
    Soup code is running.
    """
    from lxml import etree
    for event, element in etree.iterparse(StringIO(data), html=html, **kwargs):
        print("%s, %4s, %s" % (event, element.tag, element.text))
def lxml_trace ( data , html = True , * * kwargs ) : from lxml import etree for event , element in etree . iterparse ( StringIO ( data ) , html = html , * * kwargs ) : print ( "%s, %4s, %s" % ( event , element . tag , element . text ) )