Interface TreeResolver

All Known Implementing Classes:
DOMTreeResolver

public interface TreeResolver
Author:
scott

Gives the css matcher access to the information it needs about the tree structure.

Elements are the "things" in the tree structure that can be matched by the matcher.

  • Field Details

    • NO_NAMESPACE

      static final String NO_NAMESPACE
  • Method Details

    • getParentElement

      Object getParentElement(Object element)
      returns the parent element of an element, or null if this was the root element
    • getElementName

      String getElementName(Object element)
      returns the name of the element so that it may match against the selectors
    • getPreviousSiblingElement

      Object getPreviousSiblingElement(Object node)
      The previous sibling element, or null if none exists
    • isFirstChildElement

      boolean isFirstChildElement(Object element)
      returns true if this element is the first child element of its parent
    • matchesElement

      boolean matchesElement(Object element, String namespaceURI, String name)
      Returns true if element has the local name name and namespace URI namespaceURI.
      Parameters:
      element -
      namespaceURI - The namespace to match, may be null to signify any namespace. Use NO_NAMESPACE to signify that name should only match when there is no namespace defined on element.
      name - The name to match, may not be null