public class TextValueDifferenceHandler extends DifferenceHandler
DifferenceListener which ignores the (text/cdata) values of certain elements.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.RETURN_ACCEPT_DIFFERENCE, RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL, RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR, RETURN_UPGRADE_DIFFERENCE_NODES_DIFFERENT| Constructor and Description |
|---|
TextValueDifferenceHandler(String... ignored) |
| Modifier and Type | Method and Description |
|---|---|
int |
differenceFound(Difference difference) |
skippedComparisonpublic TextValueDifferenceHandler(String... ignored)
ignored - name(s) of the attribute(s) to ignore the value forpublic int differenceFound(Difference difference)
differenceFound in interface DifferenceListenerdifferenceFound in class DifferenceHandlerCopyright © 2011–2021 aiticon GmbH. All rights reserved.