You could use TagSoup. I have used it with great success. It is completely compatible with the Java XML APIs, including SAX, DOM, XSLT, and StAX. For example, here is how I used it to apply XSLT transforms to particularly poor HTML:
public static void transform(InputStream style, InputStream data)
throws SAXException, TransformerException {
XMLReader reader =
XMLReaderFactory.createXMLReader("org.ccil.cowan.tagsoup.Parser");
Source input = new SAXSource(reader, new InputSource(data));
Source xsl = new StreamSource(style);
Transformer transformer =
TransformerFactory.newInstance().newTransformer(xsl);
transformer.transform(input, new StreamResult(System.out));
}