for (Element table : root.getDescendants(
The compile-time error that I get states, "Can only iterate over an array or an instance of java.lang.Iterable". Since Element.getDescendants (Filter) returns a java.util.Iterator, I would expect my code to compile and work. What am I missing?
create an Interface IterableIterator that implements both interfaces
(Iterable, Iterator) and make this the new return type. This will keep
the compatibility and allows those fancy for loops.
Fixes #70 - getDescendants() should return Iterable as well as Iterator.