private void tagEnd() throws IOException {
  saveCurrent(2);
  go(2);
  _col+=2;
  if (isAllRead()) {
    return;
  }
  String tagName=identifier();
  if (transformations != null && transformations.hasTransformationForTag(tagName)) {
    TagTransformation tagTransformation=transformations.getTransformation(tagName);
    if (tagTransformation != null) {
      tagName=tagTransformation.getDestTag();
    }
  }
  if (tagName != null) {
    ITagInfoProvider tagInfoProvider=cleaner.getTagInfoProvider();
    TagInfo tagInfo=tagInfoProvider.getTagInfo(tagName);
    if ((tagInfo == null && !props.isOmitUnknownTags() && props.isTreatUnknownTagsAsContent() && !isReservedTag(tagName) && !props.isNamespacesAware()) || (tagInfo != null && tagInfo.isDeprecated() && !props.isOmitDeprecatedTags() && props.isTreatDeprecatedTagsAsContent())) {
      content();
      return;
    }
  }
  _currentTagToken=new EndTagToken(tagName);
  if (_asExpected) {
    skipWhitespaces();
    tagAttributes();
    if (tagName != null) {
      addToken(_currentTagToken);
    }
    if (isChar('>')) {
      go();
    }
    if (props.isUseCdataFor(tagName)) {
      _isSpecialContext=false;
      _isSpecialContextName=tagName;
    }
    if (tagName != null && tagName.equalsIgnoreCase("html")) {
      skipWhitespaces();
    }
    _currentTagToken=null;
  }
 else {
    addSavedAsContent();
  }
}

private void tagEnd ( ) throws IOException { saveCurrent ( 2 ) ; go ( 2 ) ; _col += 2 ; if ( isAllRead ( ) ) { return ; } String tagName = identifier ( ) ; if ( transformations != null && transformations . hasTransformationForTag ( tagName ) ) { TagTransformation tagTransformation = transformations . getTransformation ( tagName ) ; if ( tagTransformation != null ) { tagName = tagTransformation . getDestTag ( ) ; } } if ( tagName != null ) { ITagInfoProvider tagInfoProvider = cleaner . getTagInfoProvider ( ) ; TagInfo tagInfo = tagInfoProvider . getTagInfo ( tagName ) ; if ( ( tagInfo == null && ! props . isOmitUnknownTags ( ) && props . isTreatUnknownTagsAsContent ( ) && ! isReservedTag ( tagName ) && ! props . isNamespacesAware ( ) ) || ( tagInfo != null && tagInfo . isDeprecated ( ) && ! props . isOmitDeprecatedTags ( ) && props . isTreatDeprecatedTagsAsContent ( ) ) ) { content ( ) ; return ; } } _currentTagToken = new EndTagToken ( tagName ) ; if ( _asExpected ) { skipWhitespaces ( ) ; tagAttributes ( ) ; if ( tagName != null ) { addToken ( _currentTagToken ) ; } if ( isChar ( '>' ) ) { go ( ) ; } if ( props . isUseCdataFor ( tagName ) ) { _isSpecialContext = false ; _isSpecialContextName = tagName ; } if ( tagName != null && tagName . equalsIgnoreCase ( "html" ) ) { skipWhitespaces ( ) ; } _currentTagToken = null ; } else { addSavedAsContent ( ) ; } }
parses end of the tag . it expects that current position is at the " < " after which " / " and the tag ' s name follows .
