public void endTag(ElementName eltName) throws SAXException {
        if (phase != PHASE_CONTENT) {
            return;
        }
        String name = eltName.name;
        if (stack[--stackLen] == name) {
            contentHandler.endElement("http://www.w3.org/1999/xhtml", name, null);
        } else {
            // OK, the end tag didn't match, let's see if there's an open tag on the stack
            for (int i = stackLen; i >= 0; i--) {
                if (stack[i] == name) {
                    // found a match
                    for (int j = stackLen; j >= i; j--) {
                        contentHandler.endElement("http://www.w3.org/1999/xhtml", stack[j], null);                        
                    }
                    stackLen = i;
                    return;
                }
            }
        }
        if (stackLen == 0) {
            phase = PHASE_TRAILING;
        }
    }
@see org.xml.sax.ContentHandler#characters(char[], int, int)
resources/examples/research-src/nu/validator/perftest/TokensToSax.java