Here you can find the source of removeChild(NodeList nodes)
private static void removeChild(NodeList nodes)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.NodeList; public class Main { private static void removeChild(NodeList nodes) { for (int i = 0; i < nodes.getLength(); i++) { nodes.item(i).getParentNode().removeChild(nodes.item(i)); }/* w w w .j a va 2 s . co m*/ } }