Java tutorial
//package com.java2s; import org.w3c.dom.*; import java.util.*; public class Main { public static List<Node> listize(final NodeList list) { return new AbstractList<Node>() { public Node get(int i) { return list.item(i); } public int size() { return list.getLength(); } }; } public static List<Node> listize(final NamedNodeMap nnm) { return new AbstractList<Node>() { public Node get(int i) { return nnm.item(i); } public int size() { return nnm.getLength(); } }; } }