I am familiar with ignoring differences in attribute values, but what is the proper way to ignore an attribute by name altogether? How do I make these two documents evaluate as similar?
Doc1:
<a attributeName="value"></a>
Doc2:
<a></a>
This ended up working for me. (If there is another solution, please let me know)
DiffBuilder.compare(control.withTest(test)
.checkForSimilar()
.withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byName))
.ignoreWhitespace()
.withAttributeFilter(a -> !"attributeName".equals(a.getName()))
.build();