Search code examples
javaandroidxercesxom

How to parse (non well-formed) HTML in android?


How to parse non well-formed HTML in android ?

I tried to use XOM and TagSoup, but i get the following error when creating the Builder:

11-26 20:42:39.294: ERROR/dalvikvm(1298): Could not find method org.apache.xerces.impl.Version.getVersion, referenced from method nu.xom.Builder.

Must i install Xerces to use XOM or can i use tagsoup without XOM ?


Solution

  • You might find JTidy (http://jtidy.sourceforge.net/) - a port of HTMLTidy to be sufficiently lightweight. It outputs XHTML on request