Class AttributeValueDifferenceHandler

  • All Implemented Interfaces:
    DifferenceListener

    public class AttributeValueDifferenceHandler
    extends DifferenceHandler
    A DifferenceListener which ignores the values of certain attributes.
    For example, if setting up a AttributeValueDifferenceHandler like this
     DifferenceHandler handler = new AttributeValueDifferenceHandler("required");
     
    the following nodes would be considered as identical:
     <field name="foo" type="text" required="true">
      <value>bar</value>
     </field>
     
    and
     <field name="foo" type="text" required="false">
      <value>bar</value>
     </field>
     
    Note AttributeValueDifferenceHandler is getting applied to the whole document, ignoring every Difference in the value of any attribute with the defined name. If a more precise distinction is required, use XPathDifferenceHandler instead.
    Author:
    Matthias Müller