code: public void addAttribute(String attributeName, String attributeValue) throws XmlModelException {
          String name = attributeName.trim();
          String value = attributeValue.trim();
          if(attributesMap.containsKey(name)) {
              throw new XmlModelException("Duplicate attribute: " + name);
          }
          attributeNames.add(name);
          attributesMap.put(name, new Attribute(name, value));
      }
docs: Add a new element attribute
  @param attributeName attribute name
  @param attributeValue attribute value
  @throws XmlModelException XML model exception