API15:JSimpleXMLElement/addAttribute
From Joomla! Documentation
Description
Adds an attribute to the element
Template:Description:JSimpleXMLElement/addAttribute
Syntax
addAttribute($name, $value)
| Parameter Name | Default Value | Description |
|---|---|---|
| $name | $name | |
| $value | $attrs |
Defined in
libraries/joomla/utilities/simplexml.php
Importing
jimport( 'joomla.utilities.simplexml' );
Source Body
function addAttribute($name, $value)
{
//add the attribute to the element, override if it already exists
$this->_attributes[$name] = $value;
}
[Edit See Also] Template:SeeAlso:JSimpleXMLElement/addAttribute
Examples
<CodeExamplesForm />