private void scanData() throws Exception {
    while ((!reader.atEOF()) && (builder.getResult() == null)) {
      String str = XMLUtil.read(reader, '&');
      char ch = str.charAt(0);
      if (ch == '&') {
        XMLUtil.processEntity(str, reader, entityResolver);
        continue;
      }

      switch (ch) {
        case '<':
          scanSomeTag(false, // don't allow CDATA
                           null,  // no default namespace
                           new Properties());
          break;

        case ' ':
        case '\t':
        case '\r':
        case '\n':
          // skip whitespace
          break;

        default:
          XMLUtil.errorInvalidInput(reader.getSystemID(), reader.getLineNr(), "`" + ch + "' (0x" + Integer.toHexString(ch) + ')');
      }
    }
  }
private void scanData()