@Override
    public void comment(char[] ch, int start, int length) throws SAXException {
        if ( showCommentsInDTDs || ! inDTD ) {
            try {
                charactersAdded = false;
                writeComment( new String(ch, start, length) );
            }
            catch (IOException e) {
                handleException(e);
            }
        }

        if (lexicalHandler != null) {
            lexicalHandler.comment(ch, start, length);
        }
    }
<p>Writes the closing tag of an {@link Element}</p>

@param element <code>Element</code> to output.
@throws IOException if the element could not be written
xmppserver/src/main/java/org/jivesoftware/util/XMLWriter.java