public List<ParseTreeMatch> findAll(ParseTree tree, String xpath) {Collection<ParseTree> subtrees = XPath.findAll(tree, xpath, matcher.getParser());List<ParseTreeMatch> matches = new ArrayList<ParseTreeMatch>();for (ParseTree t : subtrees) {ParseTreeMatch match = match(t);if ( match.succeeded() ) {matches.add(match);}}return matches;}
public virtual IList<ParseTreeMatch> FindAll(IParseTree tree, string xpath){ICollection<IParseTree> subtrees = XPath.FindAll(tree, xpath, matcher.Parser);IList<ParseTreeMatch> matches = new List<ParseTreeMatch>();foreach (IParseTree t in subtrees){ParseTreeMatch match = Match(t);if (match.Succeeded){matches.Add(match);}}return matches;}