|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XPathEvaluator
Defines a simple data access interface that may be used to evaluate XPath expressions against the loaded XML document.
Method Summary | |
---|---|
List<Node> |
asList(NodeList nodeList)
Converts the given NodeList to a java list of Node instances. |
List<Node> |
findNodes(String xpathExpression)
Finds all DOM nodes that match the given XPath expression. |
String |
findText(String xpathExpression)
Searches the loaded document for the text content of the first node matched by the given XPath expression. |
XPathEvaluator |
newEvaluator(Node node)
Creates a new dependent evaluator that resolves nodes relative to the given node. |
String |
serialize(Node node)
Serializes the given DOM node to XML. |
Method Detail |
---|
String findText(String xpathExpression)
xpathExpression
- The xpath expression used to select the text content. E.g. "/html/head/title"
List<Node> findNodes(String xpathExpression)
xpathExpression
- The xpath expression used to select nodes, E.g. //table
String serialize(Node node)
node
- the node to serialize.
List<Node> asList(NodeList nodeList)
NodeList
to a java list of Node
instances.
nodeList
- the node list to convert.
XPathEvaluator newEvaluator(Node node)
The evaluator returned by this method shares internals like namespace resolution and xpath engine and may not be used concurrently (in multiple threads) with its creator.
node
- the node to resolve against.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |