• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

get data from website

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 30
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic