• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

path resolution problem for DTD file on Linux

 
jayanth babu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
iam not supposed to change the XML file. I should parse the same file as it is.

thanks
jayanth
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic