Java tutorial
//package com.java2s; import java.util.LinkedList; import java.util.List; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { /**a Convenience method that turns a NodeList into a LinkedList of Nodes * which allows for iteration * @param elm * @param str * @return */ public static List<Node> getNodeListAsList(NodeList nList) {//Element elm, String str){ List<Node> aList = new LinkedList<Node>(); for (int i = 0; i < nList.getLength(); i++) aList.add(nList.item(i)); return aList; } }