API16:JXMLElement/getAttribute
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Contents |
Description
LEGACY - Gets an elements attribute by name.
Description:JXMLElement/getAttribute
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; }
[Edit See Also] SeeAlso:JXMLElement/getAttribute
Examples
<CodeExamplesForm />

demo.xml
Output: