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.
Have you tried to place ./ or and see whether its works in both OS? like <!DOCTYPE SetElement SYSTEM "./SetElement.dtd" >
?? Just thinking... ??
Joined: May 12, 2005
iam not supposed to change the XML file. I should parse the same file as it is.
author and deputy
Joined: Jul 13, 2001
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.