public void endElement(String name)
    {
        if (name == null)
            return;

        String lastStartTag = (String) stack.peekFirst();

        if (name.equalsIgnoreCase(lastStartTag)) {
            if (name.equals("module")) {
                currentModule = null;
            } else if (currentModule != null) {
                asiModuleHandler.endElement(name);
            }

            stack.removeFirst();
        } else
            System.err.println("Unclosed tag: " + stack.peekFirst());
    }