protected int parseTag() throws IOException {
  if (_peekTag >= 0) {
    int tag=_peekTag;
    _peekTag=-1;
    return tag;
  }
  int ch=skipWhitespace();
  int endTagDelta=0;
  if (ch != '<')   throw expectedChar("'<'",ch);
  ch=read();
  if (ch == '/') {
    endTagDelta=100;
    ch=_is.read();
  }
  if (!isTagChar(ch))   throw expectedChar("tag",ch);
  _sbuf.setLength(0);
  for (; isTagChar(ch); ch=read())   _sbuf.append((char)ch);
  if (ch != '>')   throw expectedChar("'>'",ch);
  Integer value=(Integer)_tagMap.get(_sbuf.toString());
  if (value == null)   throw error("Unknown tag <" + _sbuf + ">");
  return value.intValue() + endTagDelta;
}

protected int parseTag ( ) throws IOException { if ( _peekTag >= 0 ) { int tag = _peekTag ; _peekTag = - 1 ; return tag ; } int ch = skipWhitespace ( ) ; int endTagDelta = 0 ; if ( ch != '<' ) throw expectedChar ( "'<'" , ch ) ; ch = read ( ) ; if ( ch == '/' ) { endTagDelta = 100 ; ch = _is . read ( ) ; } if ( ! isTagChar ( ch ) ) throw expectedChar ( "tag" , ch ) ; _sbuf . setLength ( 0 ) ; for ( ; isTagChar ( ch ) ; ch = read ( ) ) _sbuf . append ( ( char ) ch ) ; if ( ch != '>' ) throw expectedChar ( "'>'" , ch ) ; Integer value = ( Integer ) _tagMap . get ( _sbuf . toString ( ) ) ; if ( value == null ) throw error ( "Unknown tag <" + _sbuf + ">" ) ; return value . intValue ( ) + endTagDelta ; }
parses a tag . returns true if it ' s a start tag .
