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.
Here is my code - could someone pl. let me know what is missing - i.e. how do I
compare two xml files that have an external DTD??
public void testValidationThenCompareTwoXMLFiles() throws Exception {
File testf = new File("C:/Program
Files/xmlunit/tests/etc/InfoSettlementResponse_test.xml");
File controlf = new File("C:/Program
Files/xmlunit/tests/etc/InfoSettlementResponse_control.xml");
File dtdFile = new File("C:/Program
Files/xmlunit/tests/etc/InfoSettlementResponse.dtd");
assertEquals(dtdFile.getAbsolutePath(), true, dtdFile.exists());
String dtdUrl = dtdFile.toURL().toExternalForm();
Validator vTest = new Validator(new FileReader(testf), dtdUrl);
Validator vControl = new Validator(new FileReader(controlf), dtdUrl);
assertXMLValid(vTest);
assertXMLValid(vControl);
//GETTING AN ERROR IN THE FOLLOWING LINE
compareXML(new FileReader(testf), new FileReader(controlf));
}
Thank you.
Anamika.----------------------------------------------------------
_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Xmlunit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xmlunit-general