Here you can find the source of getNodeListItems(NodeList nodeList)
public static List<Node> getNodeListItems(NodeList nodeList)
//package com.java2s; //License from project: Open Source License import com.google.common.collect.Lists; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import java.util.List; public class Main { public static List<Node> getNodeListItems(NodeList nodeList) { List<Node> nodes = Lists.newArrayList(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if (node.getLocalName() != null) { nodes.add(node);/*from www.j av a 2 s . co m*/ } } return nodes; } }