@Override
    public void endDocument() throws SAXException {
        try {
            if (inCharacters) {
                writer.write("\"\n");
                inCharacters = false;
            }
            if (close) {
                writer.flush();
                writer.close();
            }
        } catch (IOException e) {
            throw new SAXException(e);
        }
    }
@see org.xml.sax.ContentHandler#characters(char[], int, int)
src/nu/validator/servlet/TreeDumpContentHandler.java