public class DefaultNodeMatcher extends Object implements NodeMatcher
NodeMatcherthat matches control and tests nodes for comparison with the help of
There is an important difference between using
ElementSelectors.or(org.xmlunit.diff.ElementSelector...) to combine multiple
DefaultNodeMatcher's constructor with multiple
two control and test nodes each. Assume
e1 would match the
first control node to the second test node and vice versa if used
e2 would match the nodes in order (the first
control node to the first test and so on).
ElementSelectors.or(org.xmlunit.diff.ElementSelector...) creates a combined
ElementSelector that is willing to match the first control node to
both of the test nodes - and the same for the second control node.
Since nodes are compared in order when possible the result will be
the same as running
DefaultNodeMatcher with two
will consult the
ElementSelectors separately and only
e2 if there are any nodes not matched by
at all. In this case the result will be the same as running
|Modifier and Type||Class and Description|
Determines whether two Nodes are eligible for comparison based on their node type.
|Constructor and Description|
|Modifier and Type||Method and Description|
Matches control and test nodes against each other, returns the matching pairs.
public DefaultNodeMatcher(ElementSelector... es)
Nodes passed in as attributes but not returned as member of
any pair will cause
Copyright © 2001–2020 XMLUnit. All rights reserved.