Java HTML Parsing
        Posted  
        
            by Richie_W
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Richie_W
        
        
        
        Published on 2008-10-26T13:57:00Z
        Indexed on 
            2010/04/24
            18:23 UTC
        
        
        Read the original article
        Hit count: 664
        
Hello everyone.
I'm working on an app which scrapes data from a website and I was wondering how I should go about getting the data. Specifically I need data contained in a number of div tags which use a specific CSS class - Currently (for testing purposes) I'm just checking for "div class = "classname"" in each line of HTML - This works, but I can't help but feel there is a better solution out there.
Ie. - Is there any nice way where I could give a class a line of HTML and have some nice methods like:
boolean usesClass(String CSSClassname);
String getText();
String getLink();
Many many thanks!
© Stack Overflow or respective owner