|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.brics.xact.operations.XMLNavigator
public class XMLNavigator
XPath evaluator for XML templates.
Traversal uses mutable node wrappers (see NodeWrapper
) such that the
DAG gets expanded to a tree by need. Visited nodes are copied, so all selected
nodes are guaranteed to be fresh objects.
Nested Class Summary | |
---|---|
static class |
XMLNavigator.ElementListResult
Element list result. |
static class |
XMLNavigator.NodeListResult
Node list result. |
static class |
XMLNavigator.NodeResult
Single-node result. |
static class |
XMLNavigator.Result
Abstract result of evaluation. |
Method Summary | |
---|---|
static boolean |
booleanValueOf(XML context,
String xpath)
Returns the boolean value of the first selected node. |
static boolean |
isValidXPathString(String s)
Returns false if the given string contains a quotation mark ('single' or "double"). |
static Number |
numberValueOf(XML context,
String xpath)
Returns the number value of the first selected node. |
static Element |
selectElementByID(XML context,
String id,
boolean remove_successors)
Returns the element node by the given ID. |
static XMLNavigator.ElementListResult |
selectElements(XML context,
String xpath,
boolean remove_successors)
Returns the selected sequence of element nodes (ignoring other nodes). |
static XMLNavigator.NodeListResult |
selectNodes(XML context,
String xpath,
boolean remove_successors)
Returns the selected nodes. |
static XMLNavigator.NodeResult |
selectSingleNode(XML context,
String xpath,
boolean remove_successors)
Returns the first selected node. |
static List<String> |
selectStrings(XML context,
String xpath)
Returns the string values of the selected nodes. |
static String |
stringValueOf(XML context,
String xpath)
Returns the string value of the first selected node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean booleanValueOf(XML context, String xpath)
public static boolean isValidXPathString(String s)
public static Number numberValueOf(XML context, String xpath)
public static Element selectElementByID(XML context, String id, boolean remove_successors)
public static XMLNavigator.ElementListResult selectElements(XML context, String xpath, boolean remove_successors)
public static XMLNavigator.NodeListResult selectNodes(XML context, String xpath, boolean remove_successors)
public static XMLNavigator.NodeResult selectSingleNode(XML context, String xpath, boolean remove_successors)
public static List<String> selectStrings(XML context, String xpath)
public static String stringValueOf(XML context, String xpath)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |