(PHP 5, PHP 7)
Adds new attribute node to element
public DOMAttr DOMElement::setAttributeNode ( DOMAttr $attr )
Adds new attribute node attr
to element.
Parameters:
attr
The attribute node.
Returns:
Returns old node if the attribute has been replaced or NULL
.
Exception:
Raised if the node is readonly.
See also:
Please login to continue.