Hi people,

I just started using XMLUnit in some of my projects and at the moment I'm
stuck with the following problem:

Imagine that I have a control file (control.xml) and a test file (test.xml)
which I want them to be analyzed as similar.

When I run the following code:

        final String control =
> ResourceUtils.loadResourceString("control.xml");
>         final String test = ResourceUtils.loadResourceString("test.xml");
>
>         final Diff diff = new Diff(control, test);
>         diff.overrideElementQualifier(new
> MultiLevelElementNameAndTextQualifier(5, true));
>         XMLAssert.assertXMLEqual(diff, true);
>

The result I get is that the files are similar.

Although, if I *uncomment *the existent elements, the result is that the
files are not equal.

*What do I need to do in my code so that those files be analyzed as being
similar to each other?*

Thanks in advance!

Regards,
Pedro
<includes>
  <org.openehr.am.archetype.assertion.Assertion>
    <expression class="org.openehr.am.archetype.assertion.ExpressionBinaryOperator">
<!--      <type>BOOLEAN</type>-->
<!--      <operator>OP_MATCHES</operator>-->
      <rightOperand class="org.openehr.am.archetype.assertion.ExpressionLeaf">
        <item class="org.openehr.am.archetype.constraintmodel.primitive.CString">
          <pattern>(person_death_data)[a-zA-Z0-9_-]*\.v1</pattern>
        </item>
      </rightOperand>
    </expression>
  </org.openehr.am.archetype.assertion.Assertion>
  <org.openehr.am.archetype.assertion.Assertion>
    <expression class="org.openehr.am.archetype.assertion.ExpressionBinaryOperator">
<!--      <type>BOOLEAN</type>-->
<!--      <operator>OP_MATCHES</operator>-->
      <rightOperand class="org.openehr.am.archetype.assertion.ExpressionLeaf">
        <item class="org.openehr.am.archetype.constraintmodel.primitive.CString">
          <pattern>(person_birth_data)[a-zA-Z0-9_-]*\.v1</pattern>
        </item>
      </rightOperand>
    </expression>
  </org.openehr.am.archetype.assertion.Assertion>
</includes>
<includes>
  <org.openehr.am.archetype.assertion.Assertion>
    <expression class="org.openehr.am.archetype.assertion.ExpressionBinaryOperator">
<!--      <type>BOOLEAN</type>-->
<!--      <operator>OP_MATCHES</operator>-->
      <rightOperand class="org.openehr.am.archetype.assertion.ExpressionLeaf">
        <item class="org.openehr.am.archetype.constraintmodel.primitive.CString">
          <pattern>(person_birth_data)[a-zA-Z0-9_-]*\.v1</pattern>
        </item>
      </rightOperand>
    </expression>
  </org.openehr.am.archetype.assertion.Assertion>
  <org.openehr.am.archetype.assertion.Assertion>
    <expression class="org.openehr.am.archetype.assertion.ExpressionBinaryOperator">
<!--      <type>BOOLEAN</type>-->
<!--      <operator>OP_MATCHES</operator>-->
      <rightOperand class="org.openehr.am.archetype.assertion.ExpressionLeaf">
        <item class="org.openehr.am.archetype.constraintmodel.primitive.CString">
          <pattern>(person_death_data)[a-zA-Z0-9_-]*\.v1</pattern>
        </item>
      </rightOperand>
    </expression>
  </org.openehr.am.archetype.assertion.Assertion>
</includes>
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Xmlunit-general mailing list
Xmlunit-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmlunit-general

Reply via email to