PG-Dillingham, Iain
2010-05-07 20:53:16 UTC
Hello all,
Apologies if this question has been asked (and answered) before. I checked through the archives, but only covering the last year-or-so.
I'm trying to parse an XML document from a URL, as explained in the tutorial (http://www.xom.nu/tutorial.xhtml#d0e417). Although this works perfectly with http://www.cafeconleche.org/, many other URLs result in an IOException (e.g. http://en.wikipedia.org/wiki/Main_Page). The exception suggests the problem lies with DTDs hosted on www.w3.org not responding (response code 503).
I have tried calling Builder.build(...) with an InputStream, Reader and String but get the same error each time. I am not using a validating parser.
Any advice would be much appreciated; I'm still learning the Java ropes!
Thanks in advance,
Iain
Apologies if this question has been asked (and answered) before. I checked through the archives, but only covering the last year-or-so.
I'm trying to parse an XML document from a URL, as explained in the tutorial (http://www.xom.nu/tutorial.xhtml#d0e417). Although this works perfectly with http://www.cafeconleche.org/, many other URLs result in an IOException (e.g. http://en.wikipedia.org/wiki/Main_Page). The exception suggests the problem lies with DTDs hosted on www.w3.org not responding (response code 503).
I have tried calling Builder.build(...) with an InputStream, Reader and String but get the same error each time. I am not using a validating parser.
Any advice would be much appreciated; I'm still learning the Java ropes!
Thanks in advance,
Iain