DocumentBuilder db = JAXPUtils.getDocumentBuilder();
InputStream is = this.getClass().getClassLoader().getResourceAsStream("taskdefs/optional/junit/matches.xml");
Document doc = db.parse(is);
NodeList nl = DOMUtil.listChildNodes(doc.getFirstChild(), new FooNodeFilter(), true);
assertEquals(nl.getLength(), 3);