Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Andrew Peirson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andrew,
Welcome to Javaranch.
I'm moving your question to XML and related tech. forum, folks there might help you.
Thanks
Balaji
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic