List of utility methods to do XML Child Remove All
void | removeAllChildElements(@Nonnull final Element aElement) Remove all child nodes of the given node. while (aElement.getChildNodes().getLength() > 0)
aElement.removeChild(aElement.getChildNodes().item(0));
|
void | removeAllChildNodes(Node node) Removes all child nodes from the given node. NodeList children = node.getChildNodes();
while (children.getLength() > 0) {
node.removeChild(children.item(0));
|
void | removeAllChildNodes(Node node) remove All Child Nodes while (node.hasChildNodes()) {
node.removeChild(node.getLastChild());
|
void | removeAllChildNodes(Node node) Removes all child nodes from the context Node node. NodeList children = node.getChildNodes(); for (int j = children.getLength() - 1; j >= 0; node.removeChild(children.item(j)), j--) ; |
void | removeAllChildNodes(Node node, String name) removes any immediate child nodes with the given name. ArrayList<Node> removeList = getChildNodes(node, name);
for (Node temp : removeList) {
node.removeChild(temp);
|
void | removeAllChildren(Element deps) remove All Children NodeList childNodes = deps.getChildNodes(); for (int i = childNodes.getLength() - 1; i >= 0; i--) { Node item = childNodes.item(i); deps.removeChild(item); |
void | removeAllChildren(Element node, String elementName) Delete children elements for Element by element name if (node != null) { NodeList nl = node.getChildNodes(); int len = nl.getLength(); for (int i = 0; i < len; i++) { Node childNode = nl.item(i); if (childNode != null && childNode.getLocalName() != null && childNode.getLocalName().equals(elementName)) node.removeChild(childNode); ... |
void | removeAllChildren(final Element element) Simply removes all child nodes. for (Node n = element.getFirstChild(); n != null; n = element.getFirstChild()) {
element.removeChild(n);
|
void | removeAllChildren(final Node node) Removes all children of the specified node. Node child;
while ((child = node.getFirstChild()) != null) {
node.removeChild(child);
|
void | removeAllChildren(Node node) Remove all the children of NodeList list = node.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { node.removeChild(list.item(i)); |