Class XPathExpressionComparator

  • All Implemented Interfaces:
    Comparator

    public class XPathExpressionComparator
    extends AbstractComparator
    Oracle which can ignore element/attributes by xpath expression.
    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • expressions

        private final com.google.common.collect.ImmutableList<String> expressions
    • Constructor Detail

      • XPathExpressionComparator

        public XPathExpressionComparator​(Collection<String> expressions)
        Parameters:
        expressions - the xpath expressions to ignore
      • XPathExpressionComparator

        public XPathExpressionComparator​(String... expressions)
        Parameters:
        expressions - the xpath expressions to ignore
    • Method Detail

      • normalize

        public String normalize​(String dom)
        Description copied from class: AbstractComparator
        Override this method to apply normalization to the comparison.
        Specified by:
        normalize in interface Comparator
        Overrides:
        normalize in class AbstractComparator
        Parameters:
        dom - the dom to ignore the xpath expressions from
        Returns:
        the stripped dom with the elements found with the xpath expressions