static void skipWhitespace(StdXMLReader   reader,
                              StringBuffer buffer)
      throws IOException
   {
      char ch;

      if (buffer == null) {
         do {
            ch = reader.read();
         } while ((ch == ' ') || (ch == '\t') || (ch == '\n'));
      } else {
         for (;;) {
            ch = reader.read();

            if ((ch != ' ') && (ch != '\t') && (ch != '\n')) {
               break;
            }

            if (ch == '\n') {
               buffer.append('\n');
            } else {
               buffer.append(' ');
            }
         }
      }

      reader.unread(ch);
   }