requireWhitespace();
  private void readXMLDecl()    throws IOException, XMLStreamException  {    final int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF;        require("version");    readEq();    xmlVersion = readLiteral(flags);    if ("1.0".equals(xmlVersion))      input.xml11 = false;    else if ("1.1".equals(xmlVersion))      input.xml11 = true;    else      throw new XMLStreamException("illegal XML version: " + xmlVersion);        boolean white = tryWhitespace();        if (tryRead("encoding"))      {        if (!white)          error("whitespace required before 'encoding='");        readEq();        xmlEncoding = readLiteral(flags);        if (!input.forceReader)          input.setInputEncoding(xmlEncoding);        white = tryWhitespace();      }        if (tryRead("standalone"))      {        if (!white)          error("whitespace required before 'standalone='");        readEq();        String standalone = readLiteral(flags);        if ("yes".equals(standalone))          xmlStandalone = Boolean.TRUE;        else if ("no".equals(standalone))          xmlStandalone = Boolean.FALSE;        else          error("standalone flag must be 'yes' or 'no'", standalone);      }    skipWhitespace();    require("?>");  }