----- Original Message -----
From: "Igor Fedulov" <[EMAIL PROTECTED]>
> > Any chance you could mail a snippet of your code to take a look at? Are
you
> > using the ServletContext.getResource() method to load the config file?
>
> Sorry took a while to respond. I actually tried almost every sinlge read
> method of SAXReader in order to parse the xml into Document, and finally
> when I changed from:
>
> SAXReader reader = new SAXReader();
> try {
>     dom = reader.read(fileURL);
> } catch (DocumentException de) {
>    //blah
> }
>
> to
>
> dom = reader.read(fileURL.openStream());
>
> it's all magically worked. I'm not sure if it's a bug or whatnot, but
> reader.read(InputStream) seems to work fine while reader.read(URL)
> don't...

Mmmm. This is kinda strange. Unfortunately in SAX there's no constructor for
InputSource that takes a URL object so we have to convert it to a String
first. So currently the URL.toExternalForm() method is called which is then
passed straight into the SAX parser..

What exactly does your URL look like as a String? All I can think of is some
funky URL protocol is being used by your ServletContainer but that the
String it returns is not a valid URL if you see what I mean..

Most strange...

James


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to