I want to iterate through a NodeList using a for-each loop in Java. I have it working with a for loop and a do-while loop but not for-each.
NodeList
Node
One can use the Java8 stream to iterate the NodeList.
NodeList filterList = source.getChildNodes(); IntStream.range(0, filterList.getLength()).boxed().map(filterList::item).forEach(node -> { });