static String scanIdentifier(StdXMLReader reader) throws IOException {
    StringBuilder result = new StringBuilder();

    for (; ; ) {
      char ch = reader.read();

      if ((ch == '_') ||
          (ch == ':') ||
          (ch == '-') ||
          (ch == '.') ||
          ((ch >= 'a') && (ch <= 'z')) ||
          ((ch >= 'A') && (ch <= 'Z')) ||
          ((ch >= '0') && (ch <= '9')) ||
          (ch > '\u007E')) {
        result.append(ch);
      }
      else {
        reader.unread(ch);
        break;
      }
    }

    return result.toString();
  }
static String scanIdentifier(StdXMLReader reader)