Java tutorial
//package com.java2s; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { public static Node getNode(NodeList nl, int idx) { Node n = nl.item(idx); n.getParentNode().removeChild(n);//for performance return n; } }