static void skipWhitespace(IXMLReader 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);
}

static void skipWhitespace ( IXMLReader 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 ) ; }
skips whitespace from the reader .
