GeeCON Prague 2014*
The moose likes XML and Related Technologies and the fly likes Referring to DTD in XML File 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 "Referring to DTD in XML File" Watch "Referring to DTD in XML File" New topic
Author

Referring to DTD in XML File

Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266
Hi Friends,
I had written a small program to validate an XML using a DTD. When I am referring to the DTD in the XML file its giving an error. I learned that we can refer to the DTD in the XML file in 2 ways. The first way is working fine while the second way is not working as expected. I want to make my concepts clear so I want to learn to refer the DTD using both the ways. Please do find the code snippet below :



Please do help me in clearing my concepts. Please do explain me why I am getting an exception in the second case. As I understand both the methods should work.

Thanks and Regards,
Sid.
Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051

FileNotFoundException is thrown when JVM tries to open a file denoted by a specified pathname doesnot exist or failed to open..

I donot understand you complete problem but as per my understanding i can see the
in your error message it says..


java.io.FileNotFoundException:
http://abc.go.com/Employee.dtd



But above in your code it says..




So may be you are referring to a wrong path..



SCJP6.0,My blog Ranchers from Delhi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Referring to DTD in XML File