aspose file tools
The moose likes Java in General and the fly likes How would be the best way to parse HTML Content ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "How would be the best way to parse HTML Content ?" Watch "How would be the best way to parse HTML Content ?" New topic
Author

How would be the best way to parse HTML Content ?

Kiran Shirali
Ranch Hand

Joined: Jan 26, 2009
Posts: 34
Hi Everyone,

I need to parse three or four HTML pages to extract data from them.

An example of the pages is:


In this case what I can be doing is:



Then by reading each line I can check the string for the classes 'value' and 'symbol'.

What I want to know is that whether there is a more efficient way to do this? Tomorrow it may happen that the class names can change. So I don't want my application to be tightly coupled to the HTML page.

Anybody has any suggestions?

SCJP 1.6 86%, SCWCD 5.0 on
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35249
    
    7
HtmlUnit


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How would be the best way to parse HTML Content ?
 
Similar Threads
Accessing Html web page components from normal Java Application.
the get() line...
How to refresh a table in Struts
json object send to JSF backing bean to xhtml page
How can I read values updated by javascript