Hi guys,
I would like to write a Java application,
which retrieves data from a html web page.
For instance, imagine a stock trading web page displaying
the stock's quotes every 30 seconds.
I would like to write an engine with Java that pulls the necessary data from the web page and processes it as convinient.
Do you have any ideas or hints how this could be done ?
Do you know a technology that retrieves the necessary data only from a HTML web page and faces a Java application ?
Thank you very much.
Stan.
Discussions
Web tier: servlets, JSP, Web frameworks: How to retrieve data from a HTMl page with Java
-
How to retrieve data from a HTMl page with Java (3 messages)
- Posted by: stanimir Iakov
- Posted on: September 13 2004 13:01 EDT
Threaded Messages (3)
- How to retrieve data from a HTMl page with Java by null on September 14 2004 05:11 EDT
- How to retrieve data from a HTMl page with Java by Javier C?Ra on September 14 2004 05:17 EDT
- How to retrieve data from a HTMl page with Java by Fred Bloggs on September 14 2004 05:38 EDT
-
How to retrieve data from a HTMl page with Java[ Go to top ]
- Posted by: null
- Posted on: September 14 2004 05:11 EDT
- in response to stanimir Iakov
I'm not quite sure if you'd want to do that for a real-life application, for obvious reasons - parsing of HTML and extracting data from it isn't the best way of retrieving info from third party applications, the structure of the source HTML may change, and then there are obvious questions about scalability, robustness of such an approach.
However, if you still want to go ahead, have a look here -
How to retrieve data from a HTMl page with Java[ Go to top ]
- Posted by: Javier C?Ra
- Posted on: September 14 2004 05:17 EDT
- in response to stanimir Iakov
I have done so some times by using an HTML parser written by me (that I won't disclose because it is owned by my employer); it is not difficult. You can also try to process the HTML with Tidy (http://tidy.sourceforge.net/) and generate XML from it. Also I guess there would be many HTML parsers out there. -
How to retrieve data from a HTMl page with Java[ Go to top ]
- Posted by: Fred Bloggs
- Posted on: September 14 2004 05:38 EDT
- in response to stanimir Iakov
The book Java 2 from Scratch covers exactly the sort of thing you're talking about (writing an HTML parser and building a stock tracker app.
have a look here http://www.amazon.co.uk/exec/obidos/ASIN/0789721732/qid=1095154629/ref=sr_8_xs_ap_i1_xgl/026-1876434-7394046