5 # Memory debug specific
8 dtd="""<!ELEMENT foo EMPTY>"""
9 instance="""<?xml version="1.0"?>
12 dtd = libxml2.parseDTD(None, 'test.dtd')
13 ctxt = libxml2.newValidCtxt()
14 doc = libxml2.parseDoc(instance)
15 ret = doc.validateDtd(ctxt, dtd)
17 print "error doing DTD validation"
25 # Memory debug specific
26 libxml2.cleanupParser()
27 if libxml2.debugMemory(1) == 0:
30 print "Memory leak %d bytes" % (libxml2.debugMemory(1))