This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Read XML from URL Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "Read XML from URL" Watch "Read XML from URL" New topic
Author

Read XML from URL

Subash Murugan
Greenhorn

Joined: Mar 26, 2008
Posts: 20
Hi,

I want to read an XML and parse the data from HttpUrlConnection,

from my application I will hit the URL
http://host:/UserDeetails_xml.cfm?Username=XXXX

will return the XML string, I need to parse and get the necessary info.Which is the best way to do?

Thanks
Subash
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35438
    
    9
Getting an InputStream from hwere to read the URL contents can be as easy as


An example of how to use the SAX API to parse XML can be found here. Note that where it uses "System.in" you would use the InputStream you obtained from the line of code above.


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Read XML from URL
 
Similar Threads
Reading from XML file
You've seen it a thousand times before... "SQLException: No suitable driver"
Access to XML parsing after login authorization
RMI Binding on localhost
get value from url