List of utility methods to do XML Child Remove
void | removeChildren(Node node) remove Children while (node.hasChildNodes()) {
node.removeChild(node.getFirstChild());
|
void | removeChildren(Node node) Remove all the children from a node. if (node != null) { while (node.hasChildNodes()) { node.removeChild(node.getFirstChild()); |
void | removeChildren(Node node, String name) Remove all children with specified name from the specified node Node currentChild = node.getFirstChild(); while (currentChild != null) { final Node nextChild = currentChild.getNextSibling(); if (currentChild.getNodeName().equals(name)) node.removeChild(currentChild); currentChild = nextChild; |
void | removeChildren(Node parent) remove Children for (;;) { Node n = parent.getFirstChild(); if (n == null) { break; parent.removeChild(n); |
void | removeChildren(Node parent) remove Children Node child = parent.getFirstChild();
while (child != null) {
Node next = child.getNextSibling();
parent.removeChild(child);
child = next;
|
void | removeChildren(Node parent, NodeList nodelist) remove Children for (int i = 0; i < nodelist.getLength(); i++) { parent.removeChild(nodelist.item(i)); |
void | removeChildren(Node target) Remove the child nodes under another node. while (target.hasChildNodes()) {
target.removeChild(target.getFirstChild());
|
List | removeChildren(Node xmlNode, String name, boolean ignoreCase) remove Children List<Node> removedChildren = new ArrayList<Node>(); while (true) { Node removedChild = removeChild(xmlNode, name, ignoreCase); if (removedChild == null) break; removedChildren.add(removedChild); return removedChildren; ... |
void | removeChildrenNode(Node node) remove Children Node NodeList children = node.getChildNodes(); List<Node> childrenToRemove = new ArrayList<Node>(); for (int i = 0; i < children.getLength(); i++) { childrenToRemove.add(children.item(i)); for (Node child : childrenToRemove) { node.removeChild(child); |
void | removeChildrenOfType(final Node parent, final String type) Removes any child elements that match the type final NodeList children = parent.getChildNodes(); for (int childIndex = 0; childIndex < children.getLength(); ++childIndex) { final Node child = children.item(childIndex); if (child.getNodeName().equals(type)) { parent.removeChild(child); break; |