Results 1 to 5 of 5
  1. #1
    idum is offline Member
    Join Date
    Oct 2009
    Posts
    3
    Rep Power
    0

    Default (Java newbie) retrieving data from a web site

    Hello and sorry for my english.
    I'm a programmer, even if i've not praticed from a lot of years. Now, i've decided to learn java for to restart programming.

    I'm trying to make a simple java toy-application that retrieve the city today's temperature from a web site, i.e. Yahoo or other, and use it for something (for now simple print out at System.out...).

    Now, in my actual knowledge, i have to build an opportune URI, for example weather.yahoo.com/Athens-Maine-United-States/USME0011/forecast.html?unit=c and open the opportune socket.

    So i will scroll the html stream for to find the string "feels like" and after retrieve the temperature.

    It feels to be not the best solution, but i have no idea to make differently.

    Any hints?

    Thanks all

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Why does it not feel to be the best solution?

  3. #3
    idum is offline Member
    Join Date
    Oct 2009
    Posts
    3
    Rep Power
    0

    Default

    Well, it is not so elegant.
    I thought there was some sort of HtmlRetrieve library for to investigate and harvest into Html pages.

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    There's probably lots available on the internet for anyone too lazy to write their own to copy and paste and pass as their own.

  5. #5
    idum is offline Member
    Join Date
    Oct 2009
    Posts
    3
    Rep Power
    0

    Default

    Well, was not my intention, probably i've bad expressed my thinking.
    My idea was that it can be something more rafinate that the "brutal" scanning of a stream, it is probably that i feel that as " not elegant" due my low experience in HTML and in Java. But if you tell me that in the "core" Java there is nothing better, that's ok, i've made my toy and i've learned something new.

Similar Threads

  1. Store data is not retrieving
    By JavaJunkie in forum CLDC and MIDP
    Replies: 2
    Last Post: 05-30-2009, 08:08 AM
  2. Hello, everyone. I am newbie to this site
    By baiwen in forum Introductions
    Replies: 1
    Last Post: 03-28-2009, 05:43 AM
  3. Replies: 1
    Last Post: 12-28-2008, 10:25 AM
  4. error while retrieving data from data base
    By kirtesh4u in forum New To Java
    Replies: 5
    Last Post: 11-15-2008, 04:10 PM
  5. Retrieving data from the DB
    By yuchuang in forum JDBC
    Replies: 2
    Last Post: 11-27-2007, 08:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •