API15

API15:JSimpleXMLElement/addAttribute

From Joomla! Documentation

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

Code Examples