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
Exemple #2
0
 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