From: Stefan B. <bo...@ap...> - 2007-05-02 15:51:56
|
On Wed, 2 May 2007, Anamika Majumder <Ana...@om...> wrote: > Hello - I have written the following method in which I am trying to > first validate two xml documents against an external dtd and then my > aim is to compare the two validated xml documents, but am getting an > error (no protocol InfoSettlementResponse.dtd) during the comparing > step because of the external dtd. Unfortunately there is no way as simple as in using Validator when you use Diff. Your best option is to implement an EntityResolver that maps your public ID to the File. A convenient option may be to use Apache's XML resolver and a catalog file, but implementing EntityResolver is relatively straight forward for simple cases as well. Stefan |