Class XPathUtil


  • public class XPathUtil
    extends Object
    Support for tag handlers that evaluate XPath expressions.
    Author:
    Shawn Bayern, Ramesh Mandava ( ramesh.mandava@sun.com ), Pierre Delisle ( pierre.delisle@sun.com ), Dongbin Nie, David Matejcek
    • Constructor Detail

      • XPathUtil

        public XPathUtil​(jakarta.servlet.jsp.PageContext pc)
        Constructs a new XPathUtil object associated with the given PageContext.
    • Method Detail

      • valueOf

        public String valueOf​(Node contextNode,
                              String xpathString)
                       throws jakarta.servlet.jsp.JspTagException
        Evaluate an XPath expression to a String value.
        Throws:
        jakarta.servlet.jsp.JspTagException
      • booleanValueOf

        public boolean booleanValueOf​(Node contextNode,
                                      String xpathString)
                               throws jakarta.servlet.jsp.JspTagException
        Evaluate an XPath expression to a boolean value.
        Throws:
        jakarta.servlet.jsp.JspTagException
      • selectNodes

        public List<Object> selectNodes​(Node contextNode,
                                        String xpathString)
                                 throws jakarta.servlet.jsp.JspTagException
        Evaluate an XPath expression to a List of nodes.
        Throws:
        jakarta.servlet.jsp.JspTagException
      • selectSingleNode

        public Node selectSingleNode​(Node contextNode,
                                     String xpathString)
                              throws jakarta.servlet.jsp.JspTagException
        Evaluate an XPath expression to a single node.
        Throws:
        jakarta.servlet.jsp.JspTagException
      • getContext

        public static Node getContext​(jakarta.servlet.jsp.tagext.Tag t)
                               throws jakarta.servlet.jsp.JspTagException
        Throws:
        jakarta.servlet.jsp.JspTagException