DOMElement::setAttributeNode

DOMElement::setAttributeNode

(PHP 5, PHP 7)

DOMElement::setAttributeNodeAdds new attribute node to element

Description

public DOMAttr DOMElement::setAttributeNode ( DOMAttr $attr )

Adds new attribute node attr to element.

Parameters

attr

The attribute node.