public void writeAttribute(String localName, String value)
489019
@Override
    public void writeAttribute(String nsURI, String localName, String value)
        throws XMLStreamException
    {
        // No need to set mAnyOutput, nor close the element
        if (!mStartElementOpen) {
            throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM);
        }
        doWriteAttr(localName, nsURI,
		    findOrCreateAttrPrefix(null, nsURI, mCurrElem),
                    value);
    }
1044933
public void setAttr(String attr, Object val) throws NamingException {
    getAttributes().put(attr, val);
  }
431164
public void addAttribute(String name, final String value)
    {
        if (m_elemContext.m_startTagOpen)
        {
            final String patchedName = patchName(name);
            final String localName = getLocalName(patchedName);
            final String uri = getNamespaceURI(patchedName, false);

            addAttributeAlways(uri,localName, patchedName, "CDATA", value, false);
         }
    }
1100768
public void writeAttribute(String name, Object value)
  {
    if (!_isElementOpen)
      throw new IllegalStateException("no open element");

    if (value == null)
      return;

    _isElementOpen = false;
    try {
      _strategy.writeAttribute(this, name, value);
    }
    finally {
      _isElementOpen = true;
    }

  }
1161769
public void setAttribute(String attrname, String value) {
        if (attributes == null)
            attributes = new ArrayList<Attribute>();
        Attribute.setAttribute(attributes, attrname, value);
    }
1236018
def write_attribute(name, value)
      name = name.to_s
      modify(name, @attributes[name], value)
    end
317200
public void writeAttribute(int index, XmlWriter xw, XMLValidator validator)
            throws IOException, XMLStreamException
    {
        // Note: here we assume index checks have been done by caller
        Attribute attr = mAttributes[index];
        String ln = attr.mLocalName;
        String prefix = attr.mPrefix;
        final String value = getValue(index);
        if (prefix == null || prefix.length() == 0) {
            xw.writeAttribute(ln, value);
        } else {
            xw.writeAttribute(prefix, ln, value);
        }
        if (validator != null) {
            validator.validateAttribute(ln, attr.mNamespaceURI, prefix, value);
        }
    }
1217861
public void writeDoubleAttribute(String prefix, String namespaceURI, String localName, double value) throws Exception {
		this.attribute(namespaceURI, localName, Double.toString(value));

	}
329744
public String setAttribute(final String name, final String value) {
        if(null!=value){
            return getAttributes().put(name, value);
        }else{
            getAttributes().remove(name);
            return value;
        }
    }
44176
public void writeAttributes(Iterable<Attribute> attributes) throws IOException {
    List<String> attributeNames = Lists.newArrayList();
    List<String> attributeLabels = Lists.newArrayList();

    for (Attribute attr : attributes) {
      attributeNames.add(attr.getName());
      if (attr.getLabel() != null) {
        attributeLabels.add(attr.getLabel());
      } else {
        attributeLabels.add(attr.getName());
      }
    }

    writeAttributes(attributeNames, attributeLabels);
  }
831886
private void encodeAttributes(List attributes, PrintStream out,
                                  Indenter indenter) {
        Iterator it = attributes.iterator();
        while (it.hasNext()) {
            Attribute attr = (Attribute)(it.next());
            attr.encode(out, indenter);
        }
    }
817250
@Override
    public void writeAttribute(String localName, String value)
        throws XMLStreamException
    {
        // No need to set mAnyOutput, nor close the element
        if (!mStartElementOpen && mCheckStructure) {
            reportNwfStructure(ErrorConsts.WERR_ATTR_NO_ELEM);
        }
        doWriteAttr(localName, null, null, value);
    }
667723
public void attribute(final String attrName, final String attrVal) throws IOException {
    out(" ");
    out(attrName);
    out("=");
    quote(attrVal);
  }
61568
protected void writeAttribute(OutputStream outputStream, String name, String value) {
        if (value != null) {
            write(outputStream, " " + name + "=\"" + value + "\"");
        }
    }
246412
@Override
	public void setAttribute(String name, Object value) {
		attributesSupport.setAttribute(name, value);
	}
715906
private StringBuilder appendAttributeValue(final String value, final StringBuilder buf) {
      if(value.contains("\"")) {
         buf.append("\'").append(escapeAttribute(value)).append("\'");
      } else if(value.contains(" ") || value.contains("\'") || value.contains("=")) {
         buf.append("\"").append(escapeAttribute(value)).append("\"");
      } else {
         buf.append(escapeAttribute(value));
      }
      return buf;
   }
615649
public HtmlElementWriter attribute(String name, String value) {
    attributes.put(name, value);
    return this;
  }