• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get the table data from internet and store in databse

 
kishore nerella
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
can any body tell me the procedure to fetch the <table> </table> data from internet and store it in database.

Its urgent...
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Sun Socket Tutorial (see Google) has a nifty example of downloading a web page via URL and HttpURLConnection. Once you have that, you'd probably be best off with a real HTML parser. My favorite is no longer available for download, but Google will again help you out. The one in the library editor toolkit is probably good enough for jazz.

Let us know how you do with this!
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I like to use jWebUnit for this. Although it's meant for testing web applications, it's quite easy to use for downloading web pages. It then presents the web page in a cleaned-up DOM-like way, which can be used to access various parts of the page.
 
kishore nerella
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you please send me the code of that program
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming you're addressing me (and not Stan), that would be of little use. The code depends much on the structure of the HTML page. But the jWebUnit site has a number of introductory examples; those should get you going. Plus, you'll learn a lot more by doing it yourself instead of using someone else's solution. Feel free to come back here with questions, though.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic