API16:JXMLElement/getAttribute
From Joomla! Documentation
Description
LEGACY - Gets an elements attribute by name.
Syntax
getAttribute($name)
| Parameter Name | Default Value | Description |
|---|---|---|
| $name | $name |
Returns
string
Defined in
libraries/joomla/utilities/xmlelement.php
Importing
jimport( 'joomla.utilities.xmlelement' );
Source Body
public function getAttribute($name)
{
return (string)$this->attributes()->$name;
}
demo.xml
Output: