No kidding. I actually once had a freaky memory leak of my own that I was never able to fix. I was in fact using libxml2 there, I wonder if that was the cause.
I think I'll stay away from it in the future. Unfortunate, since it's the fastest HTML parser in Python that I know of.
With stanzas like
for event, n in ElementTree.iterparse(xmlfile, events=("end",)):
if n.tag == "blar":
# do stuff
n.clear()
it doesn't even take much memory to parse files of arbitrary size.