What differentiates "the data" from "the html source code"? They're both the same thing, no? If you want updated HTML, you'll have to read the page again, but you may have problems if the page uses AJAX to refresh parts of itself - that's not easily amenable to screen scraping.
My premier tool of choice for that would be a library like HtmlUnit (or jWebUnit, which is built on top of it). But again, if the page refreshes, then those libraries need to reload the page - that doesn't happen automatically. And if the live update happens through AJAX, all bets may be off.
Kuldeep singh ranbanka Rathore wrote:Sir,
for example if we talk about any website who provides you live score(which automatically gets updated) of any game, then how can read that data(say score)
There is no one answer -- it depends on what the page is doing. And how it is getting the information from the server.
Kuldeep singh ranbanka Rathore wrote:So how can i know that how any website is refreshing...?
For understanding how a web page is constructed, I suggest the Firefox browser with plugins like Firebug that let you examine all the components.
Given the amount of money involved in sports data licensing, you may find that the designers have made it really difficult to retrieve only the scores.
Way back (1996) when Java first got started I helped make a "Instant Sports" applet that animated baseball games live while reporting scores and status of other major league games. When MLB (Major League Baseball) got an idea of how much they could get for this stuff we were priced and lawyered out.