public void assertAllConsumed() throws ParseException {
  StringBuffer message=new StringBuffer();
  if (!attrs.isEmpty()) {
    message.append("Unknown attribute");
    if (attrs.size() > 1) {
      message.append('s');
    }
    message.append(':');
    for (    String name : attrs.keySet()) {
      message.append(" '");
      message.append(name);
      message.append("' ");
    }
  }
  if (!dups.isEmpty()) {
    message.append("Duplicate attribute");
    if (dups.size() > 1) {
      message.append('s');
    }
    message.append(':');
    for (    String dup : dups) {
      message.append(" '");
      message.append(dup);
      message.append("' ");
    }
  }
  if (!contentConsumed && content != null && content.length() != 0) {
    message.append("Unexpected text content ");
  }
  if (message.length() != 0) {
    throw new ParseException(message.toString());
  }
}

public void assertAllConsumed ( ) throws ParseException { StringBuffer message = new StringBuffer ( ) ; if ( ! attrs . isEmpty ( ) ) { message . append ( "Unknown attribute" ) ; if ( attrs . size ( ) > 1 ) { message . append ( 's' ) ; } message . append ( ':' ) ; for ( String name : attrs . keySet ( ) ) { message . append ( " '" ) ; message . append ( name ) ; message . append ( "' " ) ; } } if ( ! dups . isEmpty ( ) ) { message . append ( "Duplicate attribute" ) ; if ( dups . size ( ) > 1 ) { message . append ( 's' ) ; } message . append ( ':' ) ; for ( String dup : dups ) { message . append ( " '" ) ; message . append ( dup ) ; message . append ( "' " ) ; } } if ( ! contentConsumed && content != null && content . length ( ) != 0 ) { message . append ( "Unexpected text content " ) ; } if ( message . length ( ) != 0 ) { throw new ParseException ( message . toString ( ) ) ; } }
makes sure all attributes have been removed from the list . to all attribute in the default namespace must correspond exactly one call to consume * ( ) .
