Package | Description |
---|---|
net.sf.practicalxml.junit | |
net.sf.practicalxml.xpath |
This package support classes that are primarily used for XPath evaluation.
|
Modifier and Type | Method and Description |
---|---|
static void |
DomAsserts.assertCount(int expected,
Node node,
XPathWrapper xpath)
Asserts that the specified XPath selects a specified number of nodes.
|
static void |
DomAsserts.assertCount(String message,
int expected,
Node node,
XPathWrapper xpath)
Asserts that the specified XPath selects a specified number of nodes.
|
static void |
DomAsserts.assertEquals(String expected,
Node node,
XPathWrapper xpath)
Asserts that the specified XPath selects a particular String value.
|
static void |
DomAsserts.assertEquals(String message,
String expected,
Node node,
XPathWrapper xpath)
Asserts that the specified XPath selects a particular String value.
|
static void |
DomAsserts.assertExists(Node node,
XPathWrapper xpath)
Asserts that the specified XPath selects at least one node.
|
static void |
DomAsserts.assertExists(String message,
Node node,
XPathWrapper xpath)
Asserts that the specified XPath selects at least one node.
|
static void |
DomAsserts.assertNotExists(Node node,
XPathWrapper xpath)
Asserts that the specified XPath does not select any nodes.
|
static void |
DomAsserts.assertNotExists(String message,
Node node,
XPathWrapper xpath)
Asserts that the specified XPath does not select any nodes.
|
Modifier and Type | Method and Description |
---|---|
XPathWrapper |
XPathWrapper.bindDefaultNamespace(String nsURI)
Deprecated.
In practice, this method isn't particularly useful:
if you're going to specify ":" on a term, you might
as well specify a single-character prefix. It won't
be removed, but a future implementation might parse
an expression sans colons, and insert references.
|
XPathWrapper |
XPathWrapper.bindFunction(FunctionResolver.SelfDescribingFunction func)
Binds a self-describing function to this expression.
|
XPathWrapper |
XPathWrapper.bindFunction(FunctionResolver.SelfDescribingFunction func,
String prefix)
Binds a self-describing function to this expression, along with the
prefix used to access that function.
|
XPathWrapper |
XPathWrapper.bindFunction(QName name,
XPathFunction func)
Binds a standard
XPathFunction to this expression,
handling any number of arguments. |
XPathWrapper |
XPathWrapper.bindFunction(QName name,
XPathFunction func,
int arity)
Binds a standard
XPathFunction to this expression,
handling a specific number of arguments. |
XPathWrapper |
XPathWrapper.bindFunction(QName name,
XPathFunction func,
int minArity,
int maxArity)
Binds a standard
XPathFunction to this expression,
handling a specific range of arguments. |
XPathWrapper |
XPathWrapper.bindNamespace(String prefix,
String nsURI)
Adds a namespace binding to this expression.
|
XPathWrapper |
XPathWrapper.bindVariable(QName name,
Object value)
Binds a value to a variable, replacing any previous value for that
variable.
|
XPathWrapper |
XPathWrapper.bindVariable(String name,
Object value)
Binds a value to a variable, replacing any previous value for that
variable.
|
protected XPathWrapper |
XPathWrapper.clone()
Creates a shallow clone of this object, omitting the compiled
XPath expression.
|
XPathWrapper |
XPathWrapperFactory.newXPath(String xpath)
Returns an
XPathWrapper instance for the specified expression. |
XPathWrapper |
XPathWrapper.setFunctionResolver(FunctionResolver resolver)
Attaches a pre-build
FunctionResolver to this wrapper,
replacing the existing resolver (and removing all bound functions). |