## EXPORT_SPEC int ixmlElement_setAttribute

## (IXML_Element* element,
DOMString name,
DOMString value )

> Adds a new attribute to an Element.

## Documentation

> Adds a new attribute to an Element. If an attribute with the same name already exists, the attribute value will be updated with the new value in value.

Parameters:
  element - The Element on which to set the attribute.
  name - The name of the attribute.
  value - The value of the attribute. Note that this is a non-parsed string and any markup must be escaped.
Returns:
  [int] An integer representing of the following:
  - `IXML_SUCCESS`: The operation completed successfully.
  - `IXML_INVALID_PARAMETER`: Either element, name, or value is `NULL`.
  - `IXML_INVALID_CHARACTER_ERR`: name contains an illegal character.
  - `IXML_INSUFFICIENT_MEMORY`: Not enough free memory exists to complete the operation.

Alphabetic index

This page was generated with the help of DOC++.