code: boolean setAttribute(String name, String value) {
          if (value == null) {
              return attributes.add(new Attribute(name));
          }
          for (Attribute attribute : attributes) {
              if (attribute.getName().equals(name)) {
                  attribute.setValue(value); // update with new value
                  return true;
              }
          }
          return attributes.add(new Attribute(name, value));
      }
docs: Sets an attribute on an element
  
  @param name  the attribute
  @param value the attribute value