compare elements with different attribute val

Help
Jos
2012-02-08
2013-03-03
  • Jos

    Jos - 2012-02-08

    Hi there,
    is there already an “out of the box” XmlUnit solution for this problem: http://osdir.com/ml/java.xmlunit.general/2008-11/msg00002.html
    I.e. ising the RecursiveElementNameAndTextQualifier (in combination with DifferenceConstants.ATTR_SEQUENCE_ID and DifferenceConstants.CHILD_NODELIST_SEQUENCE_ID) to compare two elements in wrong order and different attribute values, e.g.:
    A)
    <test>
    <el att="b"/>
    <el att="a"/>
    </test>

    B)
    <test>
    <el att="a"/>
    <el att="b"/>
    </test>

     
  • Stefan Bodewig

    Stefan Bodewig - 2012-02-26

    RecursiveElementNameAndTextQualifier hasn't changed and I don't expect it to change.

    In your example you don't need matching on nested texts (and no recursion either) AFAICT.  ElementNameAndAttributeQualifier should work just fine.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks