RTEditor/src/main/java/com/onegravity/rteditor/converter/tagsoup/HTMLWriter.java
@Override
    public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
        writeText4Links();

        if (!ignoreElement(uri, localName, qName, atts)) {
            elementLevel++;
            nsSupport.pushContext();
            if (forceDTD && !hasOutputDTD) {
                startDTD(localName == null ? qName : localName, "", "");
            }
            write('<');
            writeName(uri, localName, qName, true);
            writeAttributes(atts);
            if (elementLevel == 1) {
                forceNSDecls();
            }
            if (!mOmitXHTMLNamespace || !"html".equalsIgnoreCase(localName)) {
                writeNSDecls();
            }
            write('>');
            if (htmlMode && (qName.equals("script") || qName.equals("style"))) {
                cdataElement = true;
            }
            if (htmlMode && localName.equals("a")) {
                mIgnoreChars = true;
            }
            super.startElement(uri, localName, qName, atts);
        }
    }
@Override
    public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
        writeText4Links();

        if (!ignoreElement(uri, localName, qName, atts)) {
            elementLevel++;
            nsSupport.pushContext();
            if (forceDTD && !hasOutputDTD) {
                startDTD(localName == null ? qName : localName, "", "");
            }
            write('<');
            writeName(uri, localName, qName, true);
            writeAttributes(atts);
            if (elementLevel == 1) {
                forceNSDecls();
            }
            if (!mOmitXHTMLNamespace || !"html".equalsIgnoreCase(localName)) {
                writeNSDecls();
            }
            write('>');
            if (htmlMode && (qName.equals("script") || qName.equals("style"))) {
                cdataElement = true;
            }
            if (htmlMode && localName.equals("a")) {
                mIgnoreChars = true;
            }
            super.startElement(uri, localName, qName, atts);
        }
    }
Write a start tag.
<p>
Pass the event on down the filter chain for further processing.

@param uri       The Namespace URI, or the empty string if none is available.
@param localName The element's local (unprefixed) name (required).
@param qName     The element's qualified (prefixed) name, or the empty string
is none is available. This method will use the qName as a
template for generating a prefix if necessary, but it is not
guaranteed to use the same qName.
@param atts      The element's attribute list (must not be null).
@throws org.xml.sax.SAXException If there is an error writing the start tag, or if a
handler further down the filter chain raises an exception.
@see org.xml.sax.ContentHandler#startElement