com.werken.xpath
クラス XPath

java.lang.Object
  |
  +--com.werken.xpath.XPath

public class XPath
extends java.lang.Object

Main run-time interface into the XPath functionality

The XPath object embodies a textual XPath as described by the W3C XPath specification. It can be applied against a context node (or nodeset) along with context-helpers to produce the result of walking the XPath.

Example usage:

  

      // Create a new XPath
      XPath xpath = new XPath("a/b/c/../d/.[@name="foo"]);

      // Create the ContextSupport
      ContextSupport helper = new ContextSupport();

      // Use the XPathFunctionContext instance as the implement
      // for function resolution.
      helper.setFunctionContext( XPathFunctionContext.getInstance() );

      // Apply the XPath to your root context.
      Object results = xpath.applyTo(helper, myContext);

  
  

作成者:
bob mcwhirter (bob @ werken.com)
関連項目:
ContextSupport, NamespaceContext, VariableContext, FunctionContext, XPathFunctionContext

コンストラクタの概要
XPath(java.lang.String xpath)
          Construct an XPath
 
メソッドの概要
 java.util.List applyTo(ContextSupport contextSupport, org.jdom.Document doc)
           
 java.util.List applyTo(ContextSupport contextSupport, org.jdom.Element node)
          Apply this XPath to a single root node
 java.util.List applyTo(ContextSupport contextSupport, java.util.List nodes)
          Apply this XPath to a list of nodes
 java.util.List applyTo(org.jdom.Document doc)
           
 java.util.List applyTo(org.jdom.Element node)
           
 java.util.List applyTo(java.util.List nodes)
           
 java.lang.String getString()
          Retrieve the textual XPath string used to initialize this Object
 java.lang.String toString()
           
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

XPath

public XPath(java.lang.String xpath)
Construct an XPath
メソッドの詳細

toString

public java.lang.String toString()
オーバーライド:
クラス java.lang.Object 内の toString

getString

public java.lang.String getString()
Retrieve the textual XPath string used to initialize this Object
戻り値:
The XPath string

applyTo

public java.util.List applyTo(org.jdom.Document doc)

applyTo

public java.util.List applyTo(java.util.List nodes)

applyTo

public java.util.List applyTo(org.jdom.Element node)

applyTo

public java.util.List applyTo(ContextSupport contextSupport,
                              org.jdom.Document doc)

applyTo

public java.util.List applyTo(ContextSupport contextSupport,
                              java.util.List nodes)
Apply this XPath to a list of nodes
パラメータ:
contextSupport - Walk-assisting state
nodes - Root NodeSet context

applyTo

public java.util.List applyTo(ContextSupport contextSupport,
                              org.jdom.Element node)
Apply this XPath to a single root node
パラメータ:
contextSupport - Walk-assisting state
node - The root context node


Copyright ? 2000 bob mcwhirter and The Werken & Sons Company. All Rights Reserved.