handler.xmlDecl(version, encodingName, docIsStandalone, inputEncoding);
  private String parseXMLDecl(boolean ignoreEncoding)    throws SAXException, IOException    {	String	version;	String	encodingName = null;	String	standalone = null;	int	flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF;        String inputEncoding = null;                switch (this.encoding)          {          case ENCODING_EXTERNAL:          case ENCODING_UTF_8:            inputEncoding = "UTF-8";            break;          case ENCODING_ISO_8859_1:            inputEncoding = "ISO-8859-1";            break;          case ENCODING_UCS_2_12:            inputEncoding = "UTF-16BE";            break;          case ENCODING_UCS_2_21:            inputEncoding = "UTF-16LE";            break;          }	// Read the version.    require("version");    parseEq();    checkLegalVersion(version = readLiteral(flags));    if (!version.equals("1.0"))      {        if (version.equals("1.1"))          {            handler.warn("expected XML version 1.0, not: " + version);	    	xmlVersion = XML_11;          }        else          {	    	error("illegal XML version", version, "1.0 or 1.1");	    }	}	else      {	    xmlVersion = XML_10;      }	// Try reading an encoding declaration.    boolean white = tryWhitespace();    if (tryRead("encoding"))      {	    if (!white)          {            error("whitespace required before 'encoding='");          }        parseEq();        encodingName = readLiteral(flags);	    if (!ignoreEncoding)          {            setupDecoding(encodingName);          }	}	// Try reading a standalone declaration	if (encodingName != null)      {        white = tryWhitespace();      }    if (tryRead("standalone"))      {	    if (!white)          {            error("whitespace required before 'standalone='");          }        parseEq();        standalone = readLiteral(flags);        if ("yes".equals(standalone))          {		docIsStandalone = true;          }        else if (!"no".equals(standalone))          {            error("standalone flag must be 'yes' or 'no'");          }	}    skipWhitespace();    require("?>");        if (inputEncoding == null)          {            inputEncoding = encodingName;          }    handler.xmlDecl(version, encodingName, docIsStandalone,                        inputEncoding);	return encodingName;    }