Class RecursiveXPathBuilder

  • All Implemented Interfaces:
    Mapper<org.w3c.dom.Node,​XPathContext>

    public class RecursiveXPathBuilder
    extends java.lang.Object
    implements Mapper<org.w3c.dom.Node,​XPathContext>
    Finds the XPathContext of a Node by recursively building up the XPathContext.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      XPathContext apply​(org.w3c.dom.Node n)
      Performs the mapping operation.
      void setNamespaceContext​(java.util.Map<java.lang.String,​java.lang.String> prefix2uri)
      Establish a namespace context that will be used in for the XPath.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RecursiveXPathBuilder

        public RecursiveXPathBuilder()
    • Method Detail

      • setNamespaceContext

        public void setNamespaceContext​(java.util.Map<java.lang.String,​java.lang.String> prefix2uri)
        Establish a namespace context that will be used in for the XPath.

        Without a namespace context (or with an empty context) the XPath expressions will only use local names for elements and attributes.

        Parameters:
        prefix2uri - maps from prefix to namespace URI.
      • apply

        public XPathContext apply​(org.w3c.dom.Node n)
        Description copied from interface: Mapper
        Performs the mapping operation.
        Specified by:
        apply in interface Mapper<org.w3c.dom.Node,​XPathContext>
        Parameters:
        n - the input to the mapping function
        Returns:
        the mapping result