DOMElement::removeAttributeNode

Removes attribute

Description

public DOMAttrfalse DOMElement::removeAttributeNode(DOMAttr $attr)

Removes attribute attr from the element.

Parameters

attr

The attribute node.

Return Values

Returns true on success or false on failure.

Errors/Exceptions

DOM_NO_MODIFICATION_ALLOWED_ERR

Raised if the node is readonly.

DOM_NOT_FOUND_ERR

Raised if attr is not an attribute of the element.

See Also

  • DOMElement::hasAttribute
  • DOMElement::getAttributeNode
  • DOMElement::setAttributeNode