Class NodeMatcher


  • public class NodeMatcher
    extends Matcher
    Final evaluation state of a .../node() XPath expression. Matches all elements, attributes, and text.
    • Field Detail

      • INSTANCE

        public static final Matcher INSTANCE
    • Constructor Detail

      • NodeMatcher

        public NodeMatcher()
    • Method Detail

      • matchesElement

        public boolean matchesElement()
        Description copied from class: Matcher
        Returns true if the XPath expression matches the element associated with this evaluation state.
        Overrides:
        matchesElement in class Matcher
        Returns:
        XPath evaluation state for this element
      • matchesAttribute

        public boolean matchesAttribute​(String namespace,
                                        String name)
        Description copied from class: Matcher
        Returns true if the XPath expression matches the named attribute of the element associated with this evaluation state.
        Overrides:
        matchesAttribute in class Matcher
        Parameters:
        namespace - attribute namespace or null
        name - attribute name
        Returns:
        XPath evaluation state for named attribute of this element
      • matchesText

        public boolean matchesText()
        Description copied from class: Matcher
        Returns true if the XPath expression matches all text nodes whose parent is the element associated with this evaluation state.
        Overrides:
        matchesText in class Matcher
        Returns:
        XPath evaluation state for text children of this element