• Post Reply Bookmark Topic Watch Topic
  • New Topic

get data from website  RSS feed

 
Ivan Bilic
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I am the new guy here, not a total beginner at java, but not an expert either.
To get to the point, I want to write a simple code for a currency converter.
The basic idea is that it sould connect to a webpage and get the current exchange rates.
Now there are 2 things bothering me, first if You know i site with a simple outlay(so the data retrieve would be easy) and second



That works, but i find it to be to slow, very very slow. I tried an option where i loop thru line A to B of the page in a for loop before starting the while (no work done only looping) figured that would speed up the process but it did not.

Any help would be appreciated
 
Kaur Manpreet
Ranch Hand
Posts: 30
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ivan,

I tried to use the Scanner class below. I am not sure how much it would help in improving the performance but worth a try.
Also, I did not quite get the concept of variable i, so you can add it accordingly.

Thanks

 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should first consider converting the HTML string into XML and use tools suggested in this thread.
Tim suggested HtmlUnit or jWebUnit; Winston - JTidy and Brian - Selenium and Xpath
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!