'Aloha Friends!<div><br></div><div>I'm trying to process some HTML using xml.etree.ElementTree</div><div>Problem is that the HTML I'm trying to read have some not properly closed tags, as the <img> shown in line 8 below.</div>
<div><br clear="all"><div><div>  1 from xml.etree import ElementTree</div><div>  2 </div><div>  3 tree = ElementTree</div><div>  4 e = tree.fromstring(</div><div>  5     """</div><div>  6         <html></div>
<div>  7             <body></div><div>  8                 <img src='mogul.jpg'></div><div>  9             </body></div><div> 10         </html></div><div> 11     """)</div></div>
<div><br></div><div>Python whines: xml.etree.ElementTree.ParseError: mismatched tag: line 5, column 14</div><div><br></div><div>I definitely do want to work DOM style, having the whole shebang loaded into a nice structure before I start the real work. </div>
<div><br></div><div>Question is if it's possible to tweak xml.etree.ElementTree to accept, and understand sloppy html, or if you have suggestions for similar easy to use framework, preferably among the included batteries?</div>
<div><br></div><div><br></div>-- <br>/Morten %-) 
</div>