dcsimg
Parsing exception (File not found) under Unix and windows.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Juergen_Staebler
Posted On:   Monday, September 10, 2001 06:24 AM

Hey: Well, i have some problems on creating a DOM. 1: DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document sourceDoc= builder.parse(new File("D:\aalanguages.xml")); This, for creating the DOM, and it never workes. Chaning the parser to parse("file:/d:/aalanguages.xml") will do it. (see also 3rd point.) Thats right. BUT, WHY THEN I HAVE A OVERRIDEN METHODE parse(java.io.File), WHEN IT NEVER WORKS ? 2: When using UNIX I cannot pa   More>>

Hey:


Well, i have some problems on creating a DOM.


1:

			
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document sourceDoc= builder.parse(new File("D:\aalanguages.xml"));


This, for creating the DOM, and it never workes.


Chaning the parser to
			
parse("file:/d:/aalanguages.xml")

will do it.


(see also 3rd point.)


Thats right.


BUT, WHY THEN I HAVE A OVERRIDEN METHODE

parse(java.io.File),


WHEN IT NEVER WORKS ?



2:


When using UNIX I cannot parse as well.


All dir's/files are write/read/exec.


Now, parsing brings up a file-not-found exception.


Are there differences between the java implementations ?


Info - my parse methode:
			
parse(new File("/aalanguages.xml")



3:


I read the xml. Now, when using a dtd

(with help of the EntityResolver) under windows


it works fine. But under Unix I got errors. Why ?



(I thing all problems are file-handling-problems. Well, my xml and dtd ARE located in the root.)



Hopefully thanks for your help.



regards    <<Less
About | Sitemap | Contact