import sys
import libxml2
# Memory debug specific
class callback:
global log
global log
global log
global log
global log
global log
global log
global log
chunk = " url='tst'>b"
ctxt=None
reference = """startDocument:startElement html None:startElement body None:startElement foo {'url': 'tst'}:error: Tag foo invalid
:characters: bar:endElement foo:endElement body:endElement html:endDocument:"""
print "Error got: %s" % log
print "Exprected: %s" % reference
# Memory debug specific
print "OK"
else: