API16:JSimpleXMLElement/addAttribute
From Joomla! Documentation
Description
Adds an attribute to the element
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;
}
Examples
Code Examples