Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Referring to DTD in XML File

 
Siddharth Bhargava
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic