wood burning stoves 2.0*
The moose likes Web Services and the fly likes Validating XML using a DTD packaged in a JAR file.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Validating XML using a DTD packaged in a JAR file...." Watch "Validating XML using a DTD packaged in a JAR file...." New topic
Author

Validating XML using a DTD packaged in a JAR file....

Andrew Peirson
Greenhorn

Joined: Sep 20, 2004
Posts: 2
Hi all,

I'm not sure if this is the right section to post this question.. but here goes....

I have been struggling to validate an XML file based on the OFX standard using the ofx202.dtd file that can be downloaded from their website. I am not entirely sure how I should reference the DTD so that the parser can find it. I'm not sure of the system-id, public-id etc required to refer to it publicly and would like to provide a locally cached version of the dtd in a war file anyway. Unfortunately, the parser doesn't seem to be able to find an external dtd located in a war file or jar file which are packageded as part of an ear.

Does anyone have any idea how I can get round this problem? I have seen posts elsewhere that suggest creating your own entity resolver, but not sure if this is the right solution. Any suggestions, code or referred articles will be much appreciated.

Thanks in advance,
Andy.
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Hi Andrew,
Welcome to Javaranch.
I'm moving your question to XML and related tech. forum, folks there might help you.
Thanks
Balaji


Spritle Software Blogs
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validating XML using a DTD packaged in a JAR file....