toList method

List<Node> toList()

Transforms the NodeIterator into an Iterable containing all of the relevant Node's

Implementation

List<Node> toList() {
  final List<Node> result = [];
  while (moveNext()) {
    result.add(current);
  }
  return result;
}