code: public static String readUntilTag(Reader r) throws IOException {
      if (!r.ready()) {
        return "";
      }
      StringBuilder b = new StringBuilder();
      int c = r.read();
      while (c >= 0 && c != '<') {
        b.append((char) c);
        c = r.read();
      }
      return b.toString();
    }
docs: Reads all text up to next XML tag and returns it as a String.
  
  @return the String of the text read, which may be empty.