You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by trinko <tr...@pacbell.net> on 2000/08/05 22:19:22 UTC
Problem with InputSource in XML with Xerces 1.1.3
My code works fine with Xerces 1.1.1.
I get a full file path using a java file dialog. I create an InputSource
using that file path. I then try and parse it. I get a fatal SAX error
saying that the file wasn't found. Clearly the file exists because I
used the AWT file dialog to select it. The code looks basically like
this, leaving out the error handler and features setting stuff
file_path = fd.getDirectory() + fd.getFile();
InputSource is = new InputSource(file_path);
DOMParser d = new DOMParser();
d.parse(is);
a typical value of file_path would be
/disk/folder/folder/folder/folder/file name. the full path can be long.
I didn't see any mention of changes to InputSource between 1.1.1 and
1.1.3. Any idea on what's wrong or how I can work around it?
tom trinko trinko@pacbell.net
http://members.aol.com/trinkos/basepage.html
Check out my web page for Java applets, a nice set of stations of the
Cross, and info on my books
Re: Problem with InputSource in XML with Xerces 1.1.3
Posted by Andy Clark <an...@apache.org>.
trinko wrote:
> I didn't see any mention of changes to InputSource between 1.1.1 and
> 1.1.3. Any idea on what's wrong or how I can work around it?
There wasn't any change in the InputSoruce class. We have started
using a URI class instead of java.net.URL so that we're more
conformant with the XML spec. Check the FAQ in the documentation
for more details.
--
Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org