if (attrs != null) {  int size = attrs.getLength(); for (int i = 0; i < size; i++) { String name = attrs.getName(i); String value = attrs.getValue(i); if (this.attribHash.containsKey(name)) { ((XMLAttribute) this.attribHash.get(name)).setAttribValue(value); } else Log.errorln("Error: cant set XMLAttribute:["+name+"], doesnt exist in object:"+this);  } }
synchronized (attribHash) {  if (attrs != null) {  int size = attrs.getLength(); for (int i = 0; i < size; i++) { String name = attrs.getName(i); String value = attrs.getValue(i); if (name != null && value != null) ((XMLAttribute) this.attribHash.get(name)).setAttribValue(value); } } }
  protected void setXMLAttributes (AttributeList attrs) {     // set object attributes from an AttributeList     if (attrs != null) {        // whip thru the list, setting each value        int size = attrs.getLength();        for (int i = 0; i < size; i++) {           String name = attrs.getName(i);           String value = attrs.getValue(i);           if (this.attribHash.containsKey(name))            {                 ((XMLAttribute) this.attribHash.get(name)).setAttribValue(value);           } else              Log.errorln("Error: cant set XMLAttribute:["+name+"], doesnt exist in object:"+this);        }     }  }