protected void writeComment(String text) throws IOException {
        if (format.isNewlines()) {
            println();
            indent();
        }
        writer.write( "<!--" );
        writer.write( text );
        writer.write( "-->" );

        lastOutputNodeType = Node.COMMENT_NODE;
    }
This method is used to write out Nodes that contain text
and still allow for xml:space to be handled properly.
@param node the node to write
@throws IOException if the node could not be written
xmppserver/src/main/java/org/jivesoftware/util/XMLWriter.java