code: public void onXMLDeclaration (@Nullable final EXMLVersion eXMLVersion,
                                  @Nullable final String sEncoding,
                                  final boolean bStandalone,
                                  final boolean bWithNewLine)
    {
      if (eXMLVersion != null)
      {
        // Maybe switch from 1.0 to 1.1 or vice versa at the very beginning of the
        // document
        m_eXMLVersion = EXMLSerializeVersion.getFromXMLVersionOrThrow (eXMLVersion);
      }
  
      _append (PI_START)._append ("xml version=")._appendAttrValue (m_eXMLVersion.getXMLVersionString ());
      if (StringHelper.hasText (sEncoding))
        _append (" encoding=")._appendAttrValue (sEncoding);
      if (bStandalone)
        _append (" standalone=")._appendAttrValue ("yes");
      _append (PI_END);
      if (bWithNewLine)
        newLine ();
    }
docs: At the very beginning of the document (XML declaration).
  
  @param eXMLVersion
  The XML version to use. If <code>null</code> is passed,
  {@link EXMLVersion#XML_10} will be used.
  @param sEncoding
  The encoding to be used for this document. It may be <code>null</code>
  but it is strongly recommended to write a correct charset.
  @param bStandalone
  if <code>true</code> this is a standalone XML document without a
  connection to an existing DTD or XML schema
  @param bWithNewLine
  <code>true</code> to add a newline, <code>false</code> if not
  @since 9.2.1