Package org.dom4j

Examples of org.dom4j.NodeFilter.matches()


        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


    }

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

        return filter.matches(this);
    }

    public XPath createXPath(String xpathExpression) {
        return getDocumentFactory().createXPath(xpathExpression);
    }
View Full Code Here

    }

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

        return filter.matches(this);
    }

    public XPath createXPath(String xpathExpression) {
        return getDocumentFactory().createXPath(xpathExpression);
    }
View Full Code Here

/*     */   }
/*     */
/*     */   public boolean matches(String patternText) {
/* 201 */     NodeFilter filter = createXPathFilter(patternText);
/*     */
/* 203 */     return filter.matches(this);
/*     */   }
/*     */
/*     */   public XPath createXPath(String xpathExpression) {
/* 207 */     return getDocumentFactory().createXPath(xpathExpression);
/*     */   }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.