private void processSpecialTag(boolean allowCDATA) throws Exception {
    String str = XMLUtil.read(reader, '&');
    char ch = str.charAt(0);

    if (ch == '&') {
      XMLUtil.errorUnexpectedEntity(reader.getSystemID(), reader.getLineNr(), str);
    }

    switch (ch) {
      case '[':
        if (allowCDATA) {
          processCDATA();
        }
        else {
          XMLUtil.errorUnexpectedCDATA(reader.getSystemID(), reader.getLineNr());
        }

        return;

      case 'D':
        processDocType();
        return;

      case '-':
        XMLUtil.skipComment(reader);
    }
  }
private void processSpecialTag(boolean allowCDATA)