RTEditor/src/main/java/com/onegravity/rteditor/converter/tagsoup/HTMLWriter.java
public void startDocument() throws SAXException {
        writeText4Links();
        reset();
        if (!("yes".equals(outputProperties.getProperty(OMIT_XML_DECLARATION,
                "no")))) {
            write("<?xml");
            if (version == null) {
                write(" version=\"1.0\"");
            } else {
                write(" version=\"");
                write(version);
                write("\"");
            }
            if (outputEncoding != null && outputEncoding != "") {
                write(" encoding=\"");
                write(outputEncoding);
                write("\"");
            }
            if (standalone == null) {
                write(" standalone=\"yes\"?>\n");
            } else {
                write(" standalone=\"");
                write(standalone);
                write("\"");
            }
        }
        super.startDocument();
    }
public void startDocument() throws SAXException {
        writeText4Links();
        reset();
        if (!("yes".equals(outputProperties.getProperty(OMIT_XML_DECLARATION,
                "no")))) {
            write("<?xml");
            if (version == null) {
                write(" version=\"1.0\"");
            } else {
                write(" version=\"");
                write(version);
                write("\"");
            }
            if (outputEncoding != null && outputEncoding != "") {
                write(" encoding=\"");
                write(outputEncoding);
                write("\"");
            }
            if (standalone == null) {
                write(" standalone=\"yes\"?>\n");
            } else {
                write(" standalone=\"");
                write(standalone);
                write("\"");
            }
        }
        super.startDocument();
    }
Write the XML declaration at the beginning of the document.
<p>
Pass the event on down the filter chain for further processing.

@throws org.xml.sax.SAXException If there is an error writing the XML declaration, or if a
handler further down the filter chain raises an exception.
@see org.xml.sax.ContentHandler#startDocument