src/Danmichaelo/QuiteSimpleXMLElement/QuiteSimpleXMLElement.php
public function attr($attribute)
    {
        if (strpos($attribute, ':') !== false) {
            list($ns, $attribute) = explode(':', $attribute, 2);

            return trim((string) $this->el->attributes($ns, true)->{$attribute});
        }
        return trim((string) $this->el->attributes()->{$attribute});
    }
public function attr($attribute)
    {
        if (strpos($attribute, ':') !== false) {
            list($ns, $attribute) = explode(':', $attribute, 2);

            return trim((string) $this->el->attributes($ns, true)->{$attribute});
        }
        return trim((string) $this->el->attributes()->{$attribute});
    }
public function attr ( $ attribute ) { if ( strpos ( $ attribute , ':' ) !== false ) { list ( $ ns , $ attribute ) = explode ( ':' , $ attribute , 2 ) ; return trim ( ( string ) $ this -> el -> attributes ( $ ns , true ) -> { $ attribute } ) ; } return trim ( ( string ) $ this -> el -> attributes ( ) -> { $ attribute } ) ; }
Get a node attribute value. Namespace prefixes are supported.

@param string $attribute
@return string
Get a node attribute value . Namespace prefixes are supported .