Package org.dom4j

Examples of org.dom4j.NodeFilter


    }

    // 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());
            }
        }
View Full Code Here


        return xpath.numberValueOf(this);
    }

    public boolean matches(String patternText) {
        NodeFilter filter = createXPathFilter(patternText);

        return filter.matches(this);
    }
View Full Code Here

        return xpath.numberValueOf(this);
    }

    public boolean matches(String patternText) {
        NodeFilter filter = createXPathFilter(patternText);

        return filter.matches(this);
    }
View Full Code Here

/*     */
/* 197 */     return xpath.numberValueOf(this);
/*     */   }
/*     */
/*     */   public boolean matches(String patternText) {
/* 201 */     NodeFilter filter = createXPathFilter(patternText);
/*     */
/* 203 */     return filter.matches(this);
/*     */   }
View Full Code Here

TOP

Related Classes of org.dom4j.NodeFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.