jQuery in Action, 2nd edition*
The moose likes XML and Related Technologies and the fly likes path resolution problem for DTD file on Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "path resolution problem for DTD file on Linux" Watch "path resolution problem for DTD file on Linux" New topic
Author

path resolution problem for DTD file on Linux

jayanth babu
Greenhorn

Joined: May 12, 2005
Posts: 3
Hi Pals,

iam getting

FileNotFoundException: root/SetElement [no such file or directory]

when i try to parse a XML file.

My XML file starts as follows

<?xml version="1.0" ?>
<!DOCTYPE SetElement SYSTEM "SetElement.dtd" >

and i have put the SetElement.dtd in the working directory.

iam using JBuilder. On Windows it is searching for DTD file in the working directory and so works fine. But on Linux it is searching for the DTD file in the /root directory instead of working directory.

Thanks
jayanth
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Have you tried to place ./ or and see whether its works in both OS?
like
<!DOCTYPE SetElement SYSTEM "./SetElement.dtd" >

?? Just thinking... ??
jayanth babu
Greenhorn

Joined: May 12, 2005
Posts: 3
iam not supposed to change the XML file. I should parse the same file as it is.

thanks
jayanth
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
if your tasks is only parsing, and if you are not checking for Validation of xml against DTD, then you can turnoff the dtd validation in your parser using java code. I dont know what xml parser jbuilder is using, probably Xerces, if so Xerces support turning off dtd validation.
 
jQuery in Action, 2nd edition
 
subject: path resolution problem for DTD file on Linux