org.apache.taglibs.standard.tag.common.xml
Class XPathUtil

java.lang.Object
  extended by org.apache.taglibs.standard.tag.common.xml.XPathUtil

public class XPathUtil
extends java.lang.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

Constructor Summary
XPathUtil(javax.servlet.jsp.PageContext pc)
          Constructs a new XPathUtil object associated with the given PageContext.
 
Method Summary
 boolean booleanValueOf(org.w3c.dom.Node contextNode, java.lang.String xpathString)
          Evaluate an XPath expression to a boolean value.
static org.w3c.dom.Node getContext(javax.servlet.jsp.tagext.Tag t)
           
static void printDetails(org.w3c.dom.Node n)
           
 java.util.List selectNodes(org.w3c.dom.Node contextNode, java.lang.String xpathString)
          Evaluate an XPath expression to a List of nodes.
 org.w3c.dom.Node selectSingleNode(org.w3c.dom.Node contextNode, java.lang.String xpathString)
          Evaluate an XPath expression to a single node.
 java.lang.String valueOf(org.w3c.dom.Node contextNode, java.lang.String xpathString)
          Evaluate an XPath expression to a String value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathUtil

public XPathUtil(javax.servlet.jsp.PageContext pc)
Constructs a new XPathUtil object associated with the given PageContext.

Method Detail

valueOf

public java.lang.String valueOf(org.w3c.dom.Node contextNode,
                                java.lang.String xpathString)
                         throws javax.servlet.jsp.JspTagException
Evaluate an XPath expression to a String value.

Throws:
javax.servlet.jsp.JspTagException

booleanValueOf

public boolean booleanValueOf(org.w3c.dom.Node contextNode,
                              java.lang.String xpathString)
                       throws javax.servlet.jsp.JspTagException
Evaluate an XPath expression to a boolean value.

Throws:
javax.servlet.jsp.JspTagException

selectNodes

public java.util.List selectNodes(org.w3c.dom.Node contextNode,
                                  java.lang.String xpathString)
                           throws javax.servlet.jsp.JspTagException
Evaluate an XPath expression to a List of nodes.

Throws:
javax.servlet.jsp.JspTagException

selectSingleNode

public org.w3c.dom.Node selectSingleNode(org.w3c.dom.Node contextNode,
                                         java.lang.String xpathString)
                                  throws javax.servlet.jsp.JspTagException
Evaluate an XPath expression to a single node.

Throws:
javax.servlet.jsp.JspTagException

getContext

public static org.w3c.dom.Node getContext(javax.servlet.jsp.tagext.Tag t)
                                   throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

printDetails

public static void printDetails(org.w3c.dom.Node n)


Copyright (c) 1999-2012 Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.