API15:JSimpleXMLElement/addAttribute
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
Adds an attribute to the element
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
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; }
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
<CodeExamplesForm />
