aspose file tools*
The moose likes XML and Related Technologies and the fly likes parse XML from web Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "parse XML from web" Watch "parse XML from web" New topic
Author

parse XML from web

Michael Keisu
Ranch Hand

Joined: Oct 08, 2009
Posts: 30
How do I achieve that?
From what I have turned up googling, I'm guessing it's something along the lines of:



but nothing I have tried works to actually parse a XML document on the web

edit:
Oops, sorry about the confusing variable names. Edited them
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

That looks roughly correct. So what makes you think it isn't working? Hint: read our FAQ entries ItDoesntWorkIsUseless and TellTheDetails for suggestions about how to present that.
Michael Keisu
Ranch Hand

Joined: Oct 08, 2009
Posts: 30
got it working somewhat


however this is very much like DOM in JS, is there some library to ease development? It seems like a lot of work for so little
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

It's true that the DOM library is very clumsy to work with. And yes, it's a Java implementation of a language-agnostic design which has also been implemented in Javascript and other languages.

As for simplifying the programming work, sometimes using the XPath class removes a lot of the tedious code required to navigate through the document. This may or may not apply to your particular requirements.
Michael Keisu
Ranch Hand

Joined: Oct 08, 2009
Posts: 30
thanks, I shall explore it and see how things work out
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: parse XML from web