Java XML Node Remove removeNodeFromParent(Node node)

Here you can find the source of removeNodeFromParent(Node node)

Description

remove Node From Parent

License

Apache License

Declaration

public static void removeNodeFromParent(Node node) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import org.w3c.dom.Node;

public class Main {
    public static void removeNodeFromParent(Node node) {
        Node parent = node.getParentNode();
        parent.removeChild(node);//from w ww.j av  a2  s  .c o  m
    }
}

Related

  1. removeNamespaceDeclarations(Node node, String... namespaces)
  2. removeNode(final Node node)
  3. removeNode(Node node)
  4. removeNode(Node node)
  5. removeNode(Node node)
  6. removeNodes(Element parent, NodeList elements)
  7. removeNodesByName(Node node, String name)
  8. removePreviousWhiteSpace(Node node)
  9. removeQueryCallBody(Node queryElement)