[jdom-interest] SAXBuilder and java.net.URL

Stephan Trebels stephan at ncube.de
Mon May 27 03:19:45 PDT 2002


On Mon, May 27, 2002 at 04:22:12AM -0400, Marisa DeMeglio wrote:
> java.net.URL("file://e:/dev/AMIS/Java/config/amis.xml");

This would try to get /dev/AMIS/Java/config/amis.xml from the host e:
using the file protocol.  Probably not what you intended, as the host
part for the file protocol is ignored.  I'd try the following:
file:/e:/dev/AMIS/Java/config/amis.xml

> Document xDoc = sbuild.build("file:////e://dev//AMIS//Java//config//amis.xml");

This URL is invalid.  Still, I'd expect the code to try to use the
first two slashes for the hostname (ignored) and then the rest of the
slash sequences is compressed to one, which gives:
file:///e:/dev/AMIS/Java/config/amis.xml
Which is perfectly valid...

Stephan

-- 
           Stephan Trebels <stephan at ncube.de>, Consultant
mail: nCUBE Deutschland GmbH, Hanauer Str. 56, 80992 Munich, Germany
phone: +49 89 149893 0  cell: +49 172 8433111  fax: +49 89 149893 50 



More information about the jdom-interest mailing list