i want to know if it is possible to make xmlunit compare only nodes that have the same value of a specific attribute.. for example in make case i want xmlunit to compare nodes which have the same value of MOID ( attribute ) here is two xml files :
controle.xml:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<HWData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" version="1.0"/>
<NE MOID="WBTS-4073" NEType="WBTS">
<EQHO MOID="EQHO-1-0" serialNumber="V7124400225">
<UNIT MOID="UNIT-FAN-1" State="enabled" serialNumber="V735"></UNIT>
<UNIT MOID="UNIT-FAN-3" State="enabled" serialNumber="V745"></UNIT>
<UNIT MOID="UNIT-FAN-2" State="enabled" serialNumber="V734"></UNIT>
</EQHO>
</NE>
</HWData>
test.xml :
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<HWData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" version="1.0"/>
<NE MOID="WBTS-4073" NEType="WBTS">
<EQHO MOID="EQHO-1-0" serialNumber="V7124400225">
<UNIT MOID="UNIT-FAN-2" State="enabled" serialNumber="V734"></UNIT>
<UNIT MOID="UNIT-FAN-1" State="disabled" serialNumber="V735"></UNIT>
<UNIT MOID="UNIT-FAN-3" State="enabled" serialNumber="V745"></UNIT>
</EQHO>
</NE>
</HWData>
Is there a way to achieve that with xmlunit !! any other suggestions are welcomed.. thanks in advance