public String consume(String name,boolean required) throws ParseException {
  if (name == null) {
    if (content == null && required) {
      throw new ParseException(CoreErrorDomain.ERR.missingRequiredContent);
    }
    contentConsumed=true;
    return content;
  }
  String value=attrs.get(name);
  if (value == null) {
    if (required) {
      ParseException pe=new ParseException(CoreErrorDomain.ERR.missingAttribute);
      pe.setInternalReason("Missing attribute: '" + name + "'");
      throw pe;
    }
    return null;
  }
  attrs.remove(name);
  return value;
}

public String consume ( String name , boolean required ) throws ParseException { if ( name == null ) { if ( content == null && required ) { throw new ParseException ( CoreErrorDomain . ERR . missingRequiredContent ) ; } contentConsumed = true ; return content ; } String value = attrs . get ( name ) ; if ( value == null ) { if ( required ) { ParseException pe = new ParseException ( CoreErrorDomain . ERR . missingAttribute ) ; pe . setInternalReason ( "Missing attribute: '" + name + "'" ) ; throw pe ; } return null ; } attrs . remove ( name ) ; return value ; }
gets the value of an attribute and remove it from the list .
