Home | History | Annotate | Download | only in xml

Lines Matching defs:xPath

9 import javax.xml.xpath.XPath;
10 import javax.xml.xpath.XPathConstants;
11 import javax.xml.xpath.XPathExpression;
12 import javax.xml.xpath.XPathExpressionException;
13 import javax.xml.xpath.XPathFactory;
16 * Applies a Matcher to a given XML Node in an existing XML Node tree, specified by an XPath expression.
27 * @param xPathExpression XPath expression.
28 * @param valueMatcher Matcher to use at given XPath.
29 * May be null to specify that the XPath must exist but the value is irrelevant.
33 XPath xPath = XPathFactory.newInstance().newXPath();
34 compiledXPath = xPath.compile(xPathExpression);
38 throw new IllegalArgumentException("Invalid XPath : " + xPathExpression, e);
58 description.appendText("an XML document with XPath ").appendText(xpathString);
65 public static Matcher<Node> hasXPath(String xPath, Matcher<String> valueMatcher) {
66 return new HasXPath(xPath, valueMatcher);
70 public static Matcher<Node> hasXPath(String xPath) {
71 return hasXPath(xPath, null);