Class TextValueDifferenceHandler

  • All Implemented Interfaces:
    DifferenceListener

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