Class XPathEngine


  • public class XPathEngine
    extends Object
    INTERNAL Utility class for finding XML nodes using XPath expressions.
    • Method Detail

      • getInstance

        public static XPathEngine getInstance()
        Return the XPathEngine singleton.
      • selectSingleNode

        public Node selectSingleNode​(Node contextNode,
                                     String[] xPathFragments)
        Execute the XPath statement relative to the context node.
        Parameters:
        contextNode - the node relative to which the XPath statement will be executed
        Returns:
        the first node located matching the XPath statement
        Throws:
        XMLPlatformException
      • selectNodes

        public NodeList selectNodes​(Node contextNode,
                                    String[] xPathFragments)
        Execute the XPath statement relative to the context node.
        Parameters:
        contextNode - the node relative to which the XPath statement will be executed
        Returns:
        a list of nodes matching the XPath statement
        Throws:
        XMLPlatformException