views:

72

answers:

1

In need in my application to fetch remote HTML document and parse some parts out of it. As I don't want to play with string parsing, which would be really lots of work, I thought about using XSLT, which would let me build small XML document out of HTML and then read it easy.

Seems there is no XSLT support in Android? What other ways I could parse HTML without parsing content as simple string directly?

+1  A: 

I thought about using XSLT, which would let me build small XML document out of HTML and then read it easy.

Unlikely. Most HTML is not valid XML.

What other ways I could parse HTML without parsing content as simple string directly?

To parse HTML, you use an HTML parser. There are several open source ones, and it is reasonably likely that one or more will work on Android with few modifications if any.

CommonsWare