Here you can find the source of iterableNodes(final NodeList nodeList)
static Iterable<Node> iterableNodes(final NodeList nodeList)
//package com.java2s; // Use of this source code is governed by a BSD-style license that can be import java.util.AbstractList; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { static Iterable<Node> iterableNodes(final NodeList nodeList) { return new AbstractList<Node>() { @Override//from w ww.ja v a 2 s .co m public Node get(int index) { return nodeList.item(index); } @Override public int size() { return nodeList.getLength(); } }; } }