Method XmlNode():addAttribute() Foundation

Adds an attribute.

Syntax
:addAttribute( <cAttr>, <cValue> [, <cNamespace>] ) --> self
Parameters
<cAttr>
A character string with the name of the attribute.
<cValue>
A character string with the value of the attribute.
<cNamespace>
A character string specifying the namespace the attribute belongs to. The parameter is optional.
Return

:addAttribute() returns the object executing the method.

Description

The method :addAttribute() adds an attribute to the node object. Both the name and the value of the attribute must be specified. If an attribute of the same name exists already, no attribute is created. Instead, only the value of the existing attribute is changed.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.