Here you can find the source of parseList(Node node)
public static List<Node> parseList(Node node)
//package com.java2s; import java.util.ArrayList; import java.util.List; import java.util.Objects; import org.w3c.dom.Node; public class Main { public static List<Node> parseList(Node node) { Objects.requireNonNull(node); if (!node.getNodeName().equalsIgnoreCase("list")) { throw new IllegalArgumentException("Node is not list: " + node); }/*from www. j a v a 2s . c o m*/ int n = node.getChildNodes().getLength(); List<Node> nodes = new ArrayList<>(n); for (int i = 0; i < n; i++) { nodes.add(node.getChildNodes().item(i)); } return nodes; } }