--- title: Element::getAttributeNS --- Element::getAttributeNS — Returns value of attribute ## Description ## ```php public Element::getAttribute ( string|null $namespace , string $localName ) : string|null ``` Gets the value of the attribute in namespace `namespace` with local name `localName` for the current node. ## Parameters ##
namespace
localName
null
if no attribute with the given `localName` and `namespace` is found. `\DOMElement::getAttribute` returns an empty string on failure which is incorrect in newer versions of the DOM.