Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Getting Value from Website source code.

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Getting Value from Website source code.

    Hi guys this is my first time posting on this forum.
    So yeah i just started taking a computer science major in college and I have a question.
    Is it possible to get a value from a webpages source code and assign it to a variable in my program?
    The website i want to get the value from is here. It's the price of the item. In the source code of the webpage it is located on the line 243.

    <b>Current guide price:</b> 1,268

    Thanks and i'm looking forward to your help


  2. #2
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,545
    My Mood
    Grumpy
    Thanks
    0
    Thanked 167 Times in 158 Posts

    Default Re: Getting Value from Website source code.

    There are 3rd party libs about that can parse html for you. However if you are just starting then I suggest setting your sights a bit lower.
    Improving the world one idiot at a time!

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Getting Value from Website source code.

    Is it possible to get a value from a webpages source code
    Yes.
    Send a URL
    read the return.
    Parse the return.

Similar Threads

  1. How can i add an image into my source code?
    By joelmeler in forum Java Theory & Questions
    Replies: 14
    Last Post: August 1st, 2011, 06:15 PM
  2. source code for CD BURNER
    By zeerussia in forum Java Theory & Questions
    Replies: 0
    Last Post: October 23rd, 2010, 02:23 AM
  3. How to Grab the HTML source code of a website URL index page?
    By JavaPF in forum Java Networking Tutorials
    Replies: 6
    Last Post: April 22nd, 2010, 02:46 PM
  4. How to Grab the HTML source code of a website URL index page?
    By JavaPF in forum Java Code Snippets and Tutorials
    Replies: 6
    Last Post: April 22nd, 2010, 02:46 PM
  5. Website Source
    By expertOpinion in forum Java Theory & Questions
    Replies: 10
    Last Post: July 21st, 2009, 11:06 AM