org.xml.sax.ContentHandler.declaration
method
public declaration(version as String, encoding as String, standalone as String) as Void throws SAXException
Description

Receives the XML declaration pseudo-attributes.

Klyn's pure SAX parser reports the XML declaration through this callback when the document starts with <?xml ...?>.

Parameters
ParameterDescription
versionXML version, or null when omitted.
encodingDeclared encoding, or null when omitted.
standaloneStandalone value, or null when omitted.
Throws
  • SAXException if the application wants to interrupt parsing.
Example
handler.declaration("1.0", "UTF-8", null)