public function getAttribute($name, $default = null)
    {
        if ($this->hasAttribute($name)) {
            return $this->node->getAttribute($name);
        }

        return $default;
    }
public function getAttribute($name, $default = null)
    {
        if ($this->hasAttribute($name)) {
            return $this->node->getAttribute($name);
        }

        return $default;
    }
public function getAttribute ( $ name , $ default = null ) { if ( $ this -> hasAttribute ( $ name ) ) { return $ this -> node -> getAttribute ( $ name ) ; } return $ default ; }
Access to the element's attributes.

@param string $name The attribute name
@param string|null $default The value returned if the attribute does not exist

@return string|null The value of the attribute or null if attribute does not exist
Access to the element s attributes .