setPrevious(null);
    public void setDocument(DocumentImpl doc) {        document = doc;        // reset internal fields        level = 0;        currentPath.reset();        stack = new Stack();        nsMappings.clear();        rootNode = null;    }