API16

API16:JParameter/setXML

From Joomla! Documentation

Description

Sets the XML object from custom xml files.



Syntax

setXML(&$xml)
Parameter Name Default Value Description
&$xml An XML object.

Defined in

libraries/joomla/html/parameter.php

Importing

jimport( 'joomla.html.parameter' );

Source Body

public function setXML(&$xml)
{
        if (is_object($xml)) {
                if ($group = $xml->attributes('group')) {
                        $this->_xml[$group] = $xml;
                } else {
                        $this->_xml['_default'] = $xml;
                }

                if ($dir = $xml->attributes('addpath')) {
                        $this->addElementPath(JPATH_ROOT . str_replace('/', DS, $dir));
                }
        }
}



Examples

Code Examples