Hello, I want to access open an xml file located on a distant server " \\server\path\myxml.xml". If I try to open the file with the java File class, all goes perfectly well. If I try to execute following code I get a connection error:
f = new File(_fileName); if (!f.exists()) { throw new error } reader = new SAXReader(); document = reader.read("file:".concat(_fileName)); If the last line contains "file:" or not does not make a difference. After some debugging I noticed that an URL is made and that it is the URL that is opened. in the debugger I stopped on the error and noticed that in Handler.openConnection(URL) the protocol is file but in the URL(String, String, String) that is called from this one, the protocol changed into ftp. (since no ftp server is running on the windows machine, this error is logical) I tried to do document = reader.read(filereader); but even when I pass an inputstream that is open and has access to the file, an URL is made and used. I hope someone can help me with this. Thank you Hans ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user