JParameter/setXML: Difference between revisions
From Joomla! Documentation
New page: ===Description===
Sets the XML object from custom xml files
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowik... |
No edit summary |
||
| Line 17: | Line 17: | ||
!Description | !Description | ||
|- | |- | ||
| | | &$xml | ||
| | | | ||
| An XML object | | An XML object | ||
Revision as of 17:37, 25 March 2010
Description
Sets the XML object from custom xml files
Template:Description:JParameter/setXML
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
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) );
}
}
}
[Edit See Also] Template:SeeAlso:JParameter/setXML
Examples
<CodeExamplesForm />