code: private void removeNodes(String xpathExpression, Document domdoc)
      {
          List<Node> nodes = domdoc.selectNodes(xpathExpression);
          for (Node node : nodes) {
              node.detach();
          }
      }
docs: Remove the nodes found with the xpath expression.
  
  @param xpathExpression the xpath expression of the nodes
  @param domdoc The DOM document