Here you can find the source of removeAllChildren(Node node)
Parameter | Description |
---|---|
node | the node. |
public static void removeAllChildren(Node node)
//package com.java2s; /*/* ww w.j ava 2 s.co m*/ * Copyright (c) 2012. betterFORM Project - http://www.betterform.de * Licensed under the terms of BSD License */ import org.w3c.dom.*; public class Main { /** * Removes all children of the specified node. * * @param node the node. */ public static void removeAllChildren(Node node) { Node child; while ((child = node.getFirstChild()) != null) { node.removeChild(child); } } }