private String attributeValue() throws IOException {
  skipWhitespaces();
  if (isChar('<') || isChar('>') || startsWith("/>")) {
    return "";
  }
  boolean isQuoteMode=false;
  boolean isAposMode=false;
  StringBuffer result=new StringBuffer();
  if (isChar('\'')) {
    isAposMode=true;
    saveCurrent();
    go();
  }
 else   if (isChar('\"')) {
    isQuoteMode=true;
    saveCurrent();
    go();
  }
  boolean isMultiWord=props.isAllowMultiWordAttributes();
  boolean allowHtml=props.isAllowHtmlInsideAttributes();
  while (!isAllRead() && ((isAposMode && !isChar('\'') && (allowHtml || !isChar('>') && !isChar('<'))&& (isMultiWord || !isWhitespace())) || (isQuoteMode && !isChar('\"') && (allowHtml || !isChar('>') && !isChar('<'))&& (isMultiWord || !isWhitespace())) || (!isAposMode && !isQuoteMode && !isWhitespace()&& !isChar('>')&& !isChar('<')))) {
    result.append(_working[_pos]);
    saveCurrent();
    go();
  }
  if (isChar('\'') && isAposMode) {
    saveCurrent();
    go();
  }
 else   if (isChar('\"') && isQuoteMode) {
    saveCurrent();
    go();
  }
  return result.toString();
}

private String attributeValue ( ) throws IOException { skipWhitespaces ( ) ; if ( isChar ( '<' ) || isChar ( '>' ) || startsWith ( "/>" ) ) { return "" ; } boolean isQuoteMode = false ; boolean isAposMode = false ; StringBuffer result = new StringBuffer ( ) ; if ( isChar ( '\'' ) ) { isAposMode = true ; saveCurrent ( ) ; go ( ) ; } else if ( isChar ( '\"' ) ) { isQuoteMode = true ; saveCurrent ( ) ; go ( ) ; } boolean isMultiWord = props . isAllowMultiWordAttributes ( ) ; boolean allowHtml = props . isAllowHtmlInsideAttributes ( ) ; while ( ! isAllRead ( ) && ( ( isAposMode && ! isChar ( '\'' ) && ( allowHtml || ! isChar ( '>' ) && ! isChar ( '<' ) ) && ( isMultiWord || ! isWhitespace ( ) ) ) || ( isQuoteMode && ! isChar ( '\"' ) && ( allowHtml || ! isChar ( '>' ) && ! isChar ( '<' ) ) && ( isMultiWord || ! isWhitespace ( ) ) ) || ( ! isAposMode && ! isQuoteMode && ! isWhitespace ( ) && ! isChar ( '>' ) && ! isChar ( '<' ) ) ) ) { result . append ( _working [ _pos ] ) ; saveCurrent ( ) ; go ( ) ; } if ( isChar ( '\'' ) && isAposMode ) { saveCurrent ( ) ; go ( ) ; } else if ( isChar ( '\"' ) && isQuoteMode ) { saveCurrent ( ) ; go ( ) ; } return result . toString ( ) ; }
parses a single tag attribute - it is expected to be in one of the forms : name = value name = " value " name = ' value ' name
