def findAll(self, tree, xpath): subtrees = XPath.findAll(tree, xpath, self.matcher.parser) matches = list() for t in subtrees: match = self.match(t) if match.succeeded(): matches.append(match) return matches
def findAll(self, tree: ParseTree, xpath: str): subtrees = XPath.findAll(tree, xpath, self.matcher.parser) matches = list() for t in subtrees: match = self.match(t) if match.succeeded(): matches.append(match) return matches