All-in-one: XML Serializer, DOM Builder, DOM Document Creator, A SAX-style API
While this library doesn't cover the full gamut of possible weirdness that HTML provides, it does handle a lot of the most obvious stuff. All of the following are accounted for:
HTMLtoXML("<p><b>Hello") == '<p><b>Hello</b></p>'
HTMLtoXML("<img src=test.jpg>") == '<img src="test.jpg">'
HTMLtoXML("<b>Hello <p>John") == '<b>Hello </b><p>John</p>'
HTMLtoXML("<p>Hello<p>World") == '<p>Hello</p><p>World</p>'
HTMLtoXML("<input disabled>") == '<input disabled="disabled">'