public function getAttribute($attrName)
    {
        $element = $this->getDomElement();
        if (strpos($attrName, ':') === false) {
            return $element->hasAttribute($attrName) ? $element->getAttribute($attrName) : null;
        } else {
            list($prefix, $name) = explode(':', $attrName);
            $namespace = $this->getNamespace($prefix);

            return $element->hasAttributeNS($namespace, $name)
                ? $element->getAttributeNS($namespace, $name)
                : null;
        }
    }
public function getAttribute($attrName)
    {
        $element = $this->getDomElement();
        if (strpos($attrName, ':') === false) {
            return $element->hasAttribute($attrName) ? $element->getAttribute($attrName) : null;
        } else {
            list($prefix, $name) = explode(':', $attrName);
            $namespace = $this->getNamespace($prefix);

            return $element->hasAttributeNS($namespace, $name)
                ? $element->getAttributeNS($namespace, $name)
                : null;
        }
    }
public function getAttribute ( $ attrName ) { $ element = $ this -> getDomElement ( ) ; if ( strpos ( $ attrName , ':' ) === false ) { return $ element -> hasAttribute ( $ attrName ) ? $ element -> getAttribute ( $ attrName ) : null ; } else { list ( $ prefix , $ name ) = explode ( ':' , $ attrName ) ; $ namespace = $ this -> getNamespace ( $ prefix ) ; return $ element -> hasAttributeNS ( $ namespace , $ name ) ? $ element -> getAttributeNS ( $ namespace , $ name ) : null ; } }
Get attribute value.

Important! This method uses document independent prefixes registered via @{link
Extension\NamespaceExtension}. This library registers only "atom:" prefix, but this list
can be expanded by extensions.

@param string $attrName Attribute name (e. g. "type", "atom:foo").

@return string|null

@throws \InvalidArgumentException If $attrName contains unregistered prefix.

@since 1.0
Get attribute value .