API15

JParameter/setXML: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: ===Description=== Sets the XML object from custom xml files <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowik...
 
m preparing for archive only
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:


<span class="editsection" style="font-size:76%;">
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JParameter/setXML|Edit Descripton]]<nowiki>]</nowiki>
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>
</span>


{{Description:JParameter/setXML}}
<! removed transcluded page call, red link never existed >


===Syntax===
===Syntax===
Line 17: Line 17:
!Description
!Description
|-
|-
|  
| &$xml
|  
|  
|  An XML object  
|  An XML object  
Line 46: Line 46:


<span class="editsection" style="font-size:76%;">
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JParameter/setXML|Edit See Also]]<nowiki>]</nowiki>
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>
</span>
{{SeeAlso:JParameter/setXML}}
<! removed transcluded page call, red link never existed >


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=setXML
  category=setXML
  category=JParameter
  category=JParameter
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>
[[Category:Archived pages API15]]

Latest revision as of 01:01, 25 March 2017

Description

Sets the XML object from custom xml files

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

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) );
                }
        }
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

Code Examples