List of utility methods to do XML Child Remove All
void | removeAllChildren(Node node) remove All Children while (node.getFirstChild() != null)
node.removeChild(node.getFirstChild());
|
void | removeAllChildren(Node node) remove All Children while (node.hasChildNodes())
node.removeChild(node.getFirstChild());
|
void | removeAllChildren(Node node) Remove all children from the specified node while (node.hasChildNodes())
node.removeChild(node.getLastChild());
|
void | removeAllChildren(Node node) Removes all children of the specified node. Node child;
while ((child = node.getFirstChild()) != null) {
node.removeChild(child);
|
boolean | removeAllChildren(Node node) remove All Children Node child = node.getFirstChild(); if (child == null) return false; while (child != null) { Node nextChild = child.getNextSibling(); node.removeChild(child); child = nextChild; return true; |
void | removeAllChildren(Node node) Removes all children nodes from the specified node. Node firstChild = node.getFirstChild();
while (firstChild != null) {
Node nodeToRemove = firstChild;
firstChild = firstChild.getNextSibling();
node.removeChild(nodeToRemove);
|
void | removeAllChildren(org.w3c.dom.Element element) remove All Children if (element == null) { return; for (int index = 0; index < element.getChildNodes().getLength(); index++) { Node child = element.getChildNodes().item(0); element.removeChild(child); |
void | removeAllChildrenNotElement(Element parentElem) remove All Children Not Element Node node = parentElem.getFirstChild(); while (node != null) { if (node.getNodeType() != Node.ELEMENT_NODE) { Node next = node.getNextSibling(); parentElem.removeChild(node); node = next; } else { node = node.getNextSibling(); ... |
void | removeAllChildrenOfNode(Node node) remove All Children Of Node for (int i = 0; i < node.getChildNodes().getLength(); i++) { Node n = node.getChildNodes().item(i); if (n.hasChildNodes()) removeAllChildrenOfNode(n); node.removeChild(n); } else node.removeChild(n); ... |
void | removeAllNamedChild(Element parent, String name) remove All Named Child NodeList childNdList = parent.getChildNodes(); for (int i = 0; i < childNdList.getLength(); i++) { org.w3c.dom.Node n = childNdList.item(i); if (n == null) { continue; if (n.getNodeType() != org.w3c.dom.Node.ELEMENT_NODE) { continue; ... |