• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need guidance regarding making a program  RSS feed

 
Jignesh Gohel
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Sir,

I am making an program in Java in which from an existing website i want to fetch the contents of the page & store it in a database table using JDBC.

Its like, using the URL class of java.net.* package I am calling a particular URL & opening a connection to it using URLConnection class.

Now what am i trying to do is in the web page there are particular main sections having particular information regarding that section(for e.g Computers,Notebooks,Tablets,etc).

Computers Notebooks Tablets
Detail11 Detail21Detail31
Detail12 Detail22Detail32
Detail13 Detail23Detail33
Detail14 Detail24Detail34

All the details12,12 ,13, 14,etc are hyperlinks

Now for each main section the detailed information is provided in the form of a hyperlink which when clicked displays the information about that particular section.

So what i want to do is fetch the contents of a particular section's each hyperlink provided & parse that contents & store them in a database table.

So how to approach regarding this using only Core Java API.

Waiting for the reply.

Thanking you,
Jignesh
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you have three top-level problems: retrieving data from a web site, parsing the data to make sense of it, and writing the results to a database. How much of this have you tried? Where are you stuck?

BTW: One neat way to start on a problem is to make anything you don't know how to do yet another method. This fits with "programing by intention" or good old "functional decomposition" to give you code that explains what it does without getting bogged down in how. My first sketch of this program might look like:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!