withNodeMatcher with (ElementSelectors.byNameAndText) is falining test case when the order of internal nodes is not the same

Hi,

I am comparing 2 xml files including withNodeMatcher so that the order can be ignored, but when I change the order for internal nodes, test case is falining.

not sure what can be causing this error. Hopefully somebody can help out with this one.

This is the node that I am changing the order to:

      <Tas CT="9805" Im="5000" />
      <Tas CT="9803" Im="5000" />

This is the portion code:
Diff myDiff = DiffBuilder.compare(Input.fromFile(path+ “filexml.xml”))
.withTest(Input.fromFile(path+ “filexml2.xml”))
.checkForSimilar()
.ignoreWhitespace()
.normalizeWhitespace()
.withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byNameAndText))
.build();

Assert.assertFalse(myDiff.hasDifferences());

And these are the entire files:
filexml.xml:

  <DateBusiness IdN="N000001">
    <Business CN="1102" IdSAC="S000002 S000003" IdDAC="S000001" GPDBN="0" IST="0">
      <impo REG="14500000" />
      <AGEB TIP="1" />
      <InfoTass ESENT="0" SOGIV="0" FFY="0" />
      <Tas CT="9803" Im="5000" />
      <Tas CT="9805" Im="5000" />
      <Tas CT="9800" Alc="0200" Im="290000" />
    </Business>
  </DateBusiness>

filexml2.xml:

  <DateBusiness IdN="N000001">
    <Business CN="1102" IdSAC="S000002 S000003" IdDAC="S000001" GPDBN="0" IST="0">
      <impo REG="14500000" />
      <AGEB TIP="1" />
      <InfoTass ESENT="0" SOGIV="0" FFY="0" />
      <Tas CT="9805" Im="5000" />
      <Tas CT="9803" Im="5000" />
      <Tas CT="9800" Alc="0200" Im="290000" />
    </Business>
  </DateBusiness>