Add a method to SAX ContentHandler to handle the XML Declaration event.
The SAX ContentHandler defines callback methods for SAX Parsers to send content information such as elements, characters and etc. back to the application. However, it omitted the XML Declaration, using it only for the SAX Parser to make its own configurations. This is a problem for applications that wish to read the declaration for configuring readers or writers, and preserving the declaration of the source.
Add a callback method to SAX ContentHandler to handle the XML Declaration event.
public interface ContentHandler
* Receives notification of the XML declaration.
* The default implementation in the SAX API is to do nothing.
* @param version the version string as in the input document, null if not
* @param encoding the encoding string as in the input document, null if not
* @param standalone the standalone string as in the input document, null if
* not specified
* @throws SAXException if the application wants to report an error or
* interrupt the parsing process
default void declaration(String version, String encoding, String standalone)