}
// Implementation methods
// -------------------------------------------------------------------------
protected void testXPath(String xpathExpression) {
NodeFilter nodeFilter = DocumentHelper
.createXPathFilter(xpathExpression);
assertTrue("No NodeFilter object was created", nodeFilter != null);
List list = document.selectNodes("//author");
for (Iterator iter = list.iterator(); iter.hasNext();) {
Node node = (Node) iter.next();
if (nodeFilter.matches(node)) {
log("Matches node: " + node.asXML());
} else {
log("No match for node: " + node.asXML());
}
}