API16:JXMLElement/name
From Joomla! Documentation
Description
Get the name of the element. Warning: don't use getName() as it's broken up to php 5.2.3
Syntax
name()
Returns
string
Defined in
libraries/joomla/utilities/xmlelement.php
Importing
jimport( 'joomla.utilities.xmlelement' );
Source Body
public function name()
{
if(version_compare(phpversion(), '5.2.3', '>'))
{
return (string)$this->getName();
}
// workaround php bug number 41867, fixed in 5.2.4
return (string)$this->aaa->getName();
}
demo.xml
Output: