Class XPathEngine


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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static XPathEngine getInstance()
      Return the XPathEngine singleton.
      org.w3c.dom.NodeList selectNodes​(org.w3c.dom.Node contextNode, java.lang.String[] xPathFragments)
      Execute the XPath statement relative to the context node.
      org.w3c.dom.Node selectSingleNode​(org.w3c.dom.Node contextNode, java.lang.String[] xPathFragments)
      Execute the XPath statement relative to the context node.
      • Methods inherited from class java.lang.Object

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

      • getInstance

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

        public org.w3c.dom.Node selectSingleNode​(org.w3c.dom.Node contextNode,
                                                 java.lang.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:
        org.eclipse.persistence.platform.xml.XMLPlatformException
      • selectNodes

        public org.w3c.dom.NodeList selectNodes​(org.w3c.dom.Node contextNode,
                                                java.lang.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:
        org.eclipse.persistence.platform.xml.XMLPlatformException