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: Reading Web XML Document

  1. #1
    Junior Member
    Join Date
    May 2014
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Reading Web XML Document

    Hello folks,

    How could I read an XML document from the web? I've seen people use SAX or DOM methods, but I've unable to make them work due to lack of experience so I would need a pretty brief overview not just 2 bits of code without any imports etc.

    Also how would I be able to COMPARE the information? Like if it's " Sunny " I set a label text sunny etc.?!

    I'm trying to read this.

    http://api.openweathermap.org/data/2...ondon&mode=xml

    Best regards,
    Trolltrain


  2. #2
    Junior Member
    Join Date
    Jul 2014
    Posts
    11
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Reading Web XML Document

    Check this also: Java: How to read and write xml files?

    It is the complete code that reads and writes XML files

  3. #3
    Junior Member
    Join Date
    May 2014
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Reading Web XML Document

    Thank you for the reply, but I think you misunderstood me.

    As you can see I need to query data from a website.
    I do not have a static XML document in a folder somewhere.

    Best regards,
    Trolltrain

Similar Threads

  1. Java Convert String of XML to Document object is null all the time
    By anupamk in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 15th, 2014, 05:36 PM
  2. Replies: 3
    Last Post: December 13th, 2013, 07:36 AM
  3. Reading XML File using DOMParser and have problem with accessing xml
    By optiMystic23 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: January 21st, 2012, 02:22 PM
  4. How to read an XML document in Java with DOM Parse?
    By JavaPF in forum File Input/Output Tutorials
    Replies: 0
    Last Post: May 20th, 2008, 07:04 AM
  5. How to read an XML document in Java with DOM Parse?
    By JavaPF in forum Java Code Snippets and Tutorials
    Replies: 0
    Last Post: May 20th, 2008, 07:04 AM