• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Read XML from URL

 
Subash Murugan
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic