protected void markFirstTime(Element elem){
  String elemName=elem.getName();
  if (elemName.equals("html")) {
    seenHtml=true;
  }
 else   if (elemName.equals("head")) {
    seenHead=true;
  }
 else   if (elemName.equals("body")) {
    if (buf.length == 1) {
      char[] newBuf=new char[256];
      newBuf[0]=buf[0];
      buf=newBuf;
    }
    seenBody=true;
  }
}

protected void markFirstTime ( Element elem ) { String elemName = elem . getName ( ) ; if ( elemName . equals ( "html" ) ) { seenHtml = true ; } else if ( elemName . equals ( "head" ) ) { seenHead = true ; } else if ( elemName . equals ( "body" ) ) { if ( buf . length == 1 ) { char [ ] newBuf = new char [ 256 ] ; newBuf [ 0 ] = buf [ 0 ] ; buf = newBuf ; } seenBody = true ; } }
marks the first time a tag has been seen in a document
