|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.werken.xpath.XPath
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"]);
// Apply the XPath to your root context.
Object results = xpath.applyTo(myContext);
ContextSupport
,
NamespaceContext
,
VariableContext
,
FunctionContext
,
XPathFunctionContext
Constructor Summary | |
XPath(java.lang.String xpath)
Construct an XPath |
Method Summary | |
java.util.List |
applyTo(ContextSupport contextSupport,
org.dom4j.Document doc)
|
java.util.List |
applyTo(ContextSupport contextSupport,
org.dom4j.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(ContextSupport contextSupport,
org.dom4j.Node node)
|
java.util.List |
applyTo(org.dom4j.Document doc)
|
java.util.List |
applyTo(org.dom4j.Element node)
|
java.util.List |
applyTo(java.util.List nodes)
|
java.util.List |
applyTo(org.dom4j.Node node)
|
java.lang.String |
getText()
Retrieve the textual XPath string used to initialize this Object |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public XPath(java.lang.String xpath)
Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getText()
getText
in interface org.dom4j.XPath
public java.util.List applyTo(org.dom4j.Node node)
public java.util.List applyTo(org.dom4j.Document doc)
public java.util.List applyTo(java.util.List nodes)
public java.util.List applyTo(org.dom4j.Element node)
public java.util.List applyTo(ContextSupport contextSupport, org.dom4j.Node node)
public java.util.List applyTo(ContextSupport contextSupport, org.dom4j.Document doc)
public java.util.List applyTo(ContextSupport contextSupport, java.util.List nodes)
contextSupport
- Walk-assisting statenodes
- Root NodeSet contextpublic java.util.List applyTo(ContextSupport contextSupport, org.dom4j.Element node)
contextSupport
- Walk-assisting statenode
- The root context node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |