Parsing broken XML with lxml.etree.iterparse
Edit: This is an older answer and I would have done it differently today. And I’m not just referring to the dumb snark … since then BeutifulSoup4 is available and it’s really quite nice. I recommend that to anyone who stumbles over here. The currently accepted answer is, well, not what one should do. The … Read more