Lists Home |
Date Index |
- To: <email@example.com>
- Subject: what is the meaning of similar in xmlUnit
- From: "Li Yuejiong(John)" <firstname.lastname@example.org>
- Date: Thu, 4 Aug 2005 21:48:44 +0800
- Thread-index: AcWY9Ee1YYRLYR8yTNKVTDLajTottQABS6Fw
- Thread-topic: what is the meaning of similar in xmlUnit
In xmlUnit calss XmlTestCase, there are functions named assertXMLEqual
which assert that two XML documents are similar. According the
description of function similar in class Diff, "two documents are
considered to be "similar" if they contain the same elements and
attributes regardless of order. "
I construct two xml files,
In my application, these two xml files are equal. But when I try to
similar them as below, I alwayse get the error message "[different]
Expected attribute value 'Current_AsOf' but was 'Current_ForPeriod' -
comparing <context id="Current_AsOf"...>"
XMLTestCase xmlTestCase = new XMLTestCase();
What's wrong? Is there any way two compare these two files as equal?