private void tagStart() throws IOException {
  saveCurrent();
  go();
  if (isAllRead()) {
    return;
  }
  String originalTagName=identifier();
  String tagName=transformations.getTagName(originalTagName);
  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;
    }
  }
  TagNode tagNode=new TagNode(tagName);
  tagNode.setTrimAttributeValues(props.isTrimAttributeValues());
  _currentTagToken=tagNode;
  if (_asExpected) {
    skipWhitespaces();
    tagAttributes();
    if (tagName != null) {
      if (transformations != null) {
        tagNode.setAttributes(transformations.transformAttributes(originalTagName,tagNode.getAttributesInLowerCase()));
      }
      addToken(_currentTagToken);
    }
    if (isChar('>')) {
      go();
      if (props.isUseCdataFor(tagName)) {
        _isSpecialContext=true;
        _isSpecialContextName=tagName;
      }
    }
 else     if (startsWith("/>")) {
      go(2);
      addToken(new EndTagToken(tagName));
    }
    _currentTagToken=null;
  }
 else {
    addSavedAsContent();
  }
}

private void tagStart ( ) throws IOException { saveCurrent ( ) ; go ( ) ; if ( isAllRead ( ) ) { return ; } String originalTagName = identifier ( ) ; String tagName = transformations . getTagName ( originalTagName ) ; 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 ; } } TagNode tagNode = new TagNode ( tagName ) ; tagNode . setTrimAttributeValues ( props . isTrimAttributeValues ( ) ) ; _currentTagToken = tagNode ; if ( _asExpected ) { skipWhitespaces ( ) ; tagAttributes ( ) ; if ( tagName != null ) { if ( transformations != null ) { tagNode . setAttributes ( transformations . transformAttributes ( originalTagName , tagNode . getAttributesInLowerCase ( ) ) ) ; } addToken ( _currentTagToken ) ; } if ( isChar ( '>' ) ) { go ( ) ; if ( props . isUseCdataFor ( tagName ) ) { _isSpecialContext = true ; _isSpecialContextName = tagName ; } } else if ( startsWith ( "/>" ) ) { go ( 2 ) ; addToken ( new EndTagToken ( tagName ) ) ; } _currentTagToken = null ; } else { addSavedAsContent ( ) ; } }
parses start of the tag . it expects that current position is at the " < " after which the tag ' s name follows .
