|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tinyjee.maven.dim.utils.XPathEvaluatorImplementation
public class XPathEvaluatorImplementation
Implements XPathEvaluator.
| Field Summary | |
|---|---|
static String |
DEFAULT_PREFIX
|
| Constructor Summary | |
|---|---|
XPathEvaluatorImplementation(Document document)
Creates a new evaluator around the given 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. |
static String |
serializeNode(Node node,
boolean omitDeclaration,
boolean standalone)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_PREFIX
| Constructor Detail |
|---|
public XPathEvaluatorImplementation(Document document)
document - the document to evaluate on.| Method Detail |
|---|
public static String serializeNode(Node node,
boolean omitDeclaration,
boolean standalone)
public String findText(String xpathExpression)
XPathEvaluator
findText in interface XPathEvaluatorxpathExpression - The xpath expression used to select the text content. E.g. "/html/head/title"
public List<Node> findNodes(String xpathExpression)
XPathEvaluator
findNodes in interface XPathEvaluatorxpathExpression - The xpath expression used to select nodes, E.g. //table
public String serialize(Node node)
XPathEvaluator
serialize in interface XPathEvaluatornode - the node to serialize.
public List<Node> asList(NodeList nodeList)
XPathEvaluatorNodeList to a java list of Node instances.
asList in interface XPathEvaluatornodeList - the node list to convert.
public XPathEvaluator newEvaluator(Node node)
XPathEvaluator
newEvaluator in interface XPathEvaluatornode - the node to resolve against.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||