It may also return DOMNameSpaceNode if you`re requesting 'xmlns:_prefix_'. So you`re unable to remove it with removeAttributeNode() which requires DOMAttr as parameter.
DOMElement::getAttributeNode
(PHP 5)
DOMElement::getAttributeNode — Returns attribute node
Descrierea
Returns the attribute node with name name for the
current element.
Parametri
-
name -
The name of the attribute.
Valorile întoarse
The attribute node.
Vedeți de asemenea
- DOMElement::hasAttribute() - Checks to see if attribute exists
- DOMElement::setAttributeNode() - Adds new attribute node to element
- DOMElement::removeAttributeNode() - Removes attribute
lowezar at gmail dot com ¶
2 years ago
