// Enumerate the BaseX ANodes in a NodeIter // Also, does not do a validity check protected IEnumerable <ANode> EnumerateANodes(NodeIter iter) { while (true) { ANode node = iter.next(); if (node == null) { yield break; } yield return(node.copy()); } }