Click here to Skip to main content
15,889,879 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi
I want to read a web page and access its DOM tree for processing. Is there any suggested way of doing this on an android based device? I need to extract a few fields from a table, and I don't want to parse the HTML myself since it's not well-formed.

The page itself should never be visible to the user, I'm just interested in the parser. Surely there must be a few which some of you have used.

Java libraries isn't really my field so any suggestion is appreciated.

Thanks in advance.

/Niklas
Posted
Updated 31-Jul-11 3:08am
v3

1 solution

Here is a sweet collection of Java HTML parser libraries http://java-source.net/open-source/html-parsers[^].

I'd go with Java Mozilla Html Parser[^] or HotSax[^] depending on the exact requirements.

Cheers!

—MRB
 
Share this answer
 
v2
Comments
Niklas L 1-Aug-11 5:45am    
That gave me a few options. Thanks for that!
Manfred Rudolf Bihy 1-Aug-11 7:21am    
It's been a pleasure!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900