From: SourceForge.net <no...@so...> - 2012-02-01 14:21:12
|
Bugs item #3476575, was opened at 2012-01-20 01:41 Message generated for change (Settings changed) made by bodewig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=3476575&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Works For Me Priority: 5 Private: No Submitted By: Athran_Zara (zarathran) Assigned to: Nobody/Anonymous (nobody) Summary: Wrong number of childs (CHILD_NODELIST_LENGTH_ID) Initial Comment: I have 2 similar XMLs. I overwrite the differenceListener to catch and treat each case of differences (It allows mefor example to use regexp if I want in field and remove the error). I have a parent node named xat2, and a childNode named shuttle. Everything not in shuttle isn't treated. My problem is that for the Control XML the Diff tells me there is 3 child Node for shuttle, only 1 for the test XML. Idem for transport, and for partner it tells me 7 child for control instead of 3 (for test xml). I don't understand why there is this false number of child. Is it a bug or a mistake from myself ? Thank you for your help, Sébastien Test : <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xat2 xmlns="http://xat2.xxxx.fr" version="2.0" message-id="f3e1d64f-f981-422f-9277-e840a4645551" correlation-id="9997e625-1365-4d28-a78c-ac7d4ad0f849"> <date-list> <explicit-date source="XAT2"> <breakdown-list> <classification dictionary="XXXX:date" ref="receive" source="XAT2">Receive date</classification> </breakdown-list> <date format="dd.MM.yyyy HH:mm:ss:S Z">19.01.2012 12:02:20:325 +0100</date> </explicit-date> <explicit-date source="XAT2"> <breakdown-list> <classification dictionary="XXXX:date" ref="dispatch" source="XAT2">Completion date</classification> </breakdown-list> <date format="dd.MM.yyyy HH:mm:ss:S Z">19.01.2012 12:02:27:598 +0100</date> </explicit-date> </date-list> <message-list> <message> <message-category>ack</message-category> <technical-description>getPartner processing complete</technical-description> <classification-list> <classification dictionary="Xat2:message" ref="complete"></classification> </classification-list> </message> </message-list> <shuttle> <transport> <partner> <name>[a-zA-Z]*</name> <version-code>[0-9].[0-9].[0-9].[a-zA-Z0-9]*</version-code> <component-version-list> <classification dictionary="XXXX:version" ref="versionLocaleBase">[0-9]*</classification> <classification dictionary="XXXX:version" ref="versionApplicationBase">[0-9]*</classification> </component-version-list> </partner> </transport> </shuttle> </xat2> Control : <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xat2 xmlns="http://xat2.xxxx.fr" version="2.0" message-id="9b9fdb8b-1a8f-4f17-b288-a7bda6483e32" correlation-id="9997e625-1365-4d28-a78c-ac7d4ad0f849"> <date-list> <explicit-date source="XAT2"> <breakdown-list> <classification dictionary="XXXX:date" ref="receive" source="XAT2">Receive date</classification> </breakdown-list> <date format="dd.MM.yyyy HH:mm:ss:S Z">20.01.2012 10:12:19:801 +0100</date> </explicit-date> <explicit-date source="XAT2"> <breakdown-list> <classification dictionary="XXXX:date" ref="dispatch" source="XAT2">Completion date</classification> </breakdown-list> <date format="dd.MM.yyyy HH:mm:ss:S Z">20.01.2012 10:12:32:895 +0100</date> </explicit-date> </date-list> <message-list> <message> <message-category>ack</message-category> <technical-description>getPartner processing complete</technical-description> <classification-list> <classification dictionary="Xat2:message" ref="complete"></classification> </classification-list> </message> </message-list> <shuttle> <transport> <partner> <name>Myname</name> <version-code>6.0.1.0c</version-code> <component-version-list> <classification dictionary="XXXX:version" ref="versionLocaleBase">140</classification> <classification dictionary="XXXX:version" ref="versionApplicationBase">120</classification> </component-version-list> </partner> </transport> </shuttle> </xat2> ---------------------------------------------------------------------- Comment By: Athran_Zara (zarathran) Date: 2012-02-01 05:55 Message: Thank you ! ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2012-01-20 08:35 Message: In your test document shutle has three child nodes: (1) a text node consisting of a newline and a few spaces (2) the transport element (3) a text node consisting of a newline and a few spaces You probably want to ignore "ignorable whitespace", see <http://xmlunit.sourceforge.net/userguide/html/ar01s02.html#Basic:%20Element%20Content%20Whitespace> ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=3476575&group_id=23187 |