@Override
    public void startElement(String uri, String localName, String qName, Attributes attributes)
            throws SAXException {
        super.startElement(uri, localName, qName, attributes);

        if ("img".equals(localName) && attributes.getValue("alt") != null) {
            String nfo = "[image: " + attributes.getValue("alt") + ']';

            characters(nfo.toCharArray(), 0, nfo.length());
        }

        if ("a".equals(localName) && attributes.getValue("name") != null) {
            String nfo = "[bookmark: " + attributes.getValue("name") + ']';

            characters(nfo.toCharArray(), 0, nfo.length());
        }
    }
Creates a content handler that writes XHTML body character events to
the given writer.

@param writer writer
tika-core/src/main/java/org/apache/tika/sax/RichTextContentHandler.java