This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes how to get the table data from internet and store in databse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "how to get the table data from internet and store in databse" Watch "how to get the table data from internet and store in databse" New topic
Author

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

kishore nerella
Greenhorn

Joined: Jul 17, 2007
Posts: 15
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

Joined: Jan 29, 2003
Posts: 8791
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!


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41123
    
  45
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.


Ping & DNS - my free Android networking tools app
kishore nerella
Greenhorn

Joined: Jul 17, 2007
Posts: 15
can you please send me the code of that program
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41123
    
  45
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get the table data from internet and store in databse
 
Similar Threads
Need clarification for jsp:include.
how to extract data to an xl sheet
Printing out info from mysql database
servlet or jsp page with prefilled forms
SOS--------display data collection from database