I'm trying to use javax.xml.parser.DocumentBuilder in Xerces 1.2.0 to parse a File. The File I pass in isn't being opened because of this code:
public Document parse(File file) throws SAXException, IOException, IllegalArgumentException { if (file==null) throw new IllegalArgumentException(); return(this.parse(new InputSource(file.getName()))); } When the new InputSource is created, it is passed file.getName(), which is just the last part of the path. So it looks in whatever the current directory happens to be and can't find my file. Is there a fix for this already?