code: public void removeDataNode(Node rootNode, String dataId) throws RepositoryException
     {
        Node parentNode = null;
        try
        {
           Node node = getDataNode(rootNode, dataId);
           parentNode = node.getParent();
           node.remove();
           parentNode.save();
        }
        catch (InvalidItemStateException e)
        {
           if (LOG.isTraceEnabled())
           {
              LOG.trace("An exception occurred: " + e.getMessage());
           }
           if (parentNode != null)
              parentNode.refresh(false);
        }
        catch (PathNotFoundException e)
        {
           if (LOG.isTraceEnabled())
           {
              LOG.trace("An exception occurred: " + e.getMessage());
           }
        }
     }
docs: {@inheritDoc}