API15

JSimpleXMLElement: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
No edit summary
m clean up
Line 1: Line 1:
<span class="editsection" style="font-size:76%;">
{{subst:Description:JSimpleXMLElement}}
<nowiki>[</nowiki>[[Description:JSimpleXMLElement|Edit Descripton]]<nowiki>]</nowiki>
</span>
{{Description:JSimpleXMLElement}}


===Defined in===
===Defined in===
Line 58: Line 55:
<source lang="php">jimport( 'joomla.utilities.simplexml' );</source>
<source lang="php">jimport( 'joomla.utilities.simplexml' );</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JSimpleXMLElement|Edit See Also]]<nowiki>]</nowiki>
{{subst:SeeAlso:JSimpleXMLElement}}
</span>
{{SeeAlso:JSimpleXMLElement}}


===Examples===
===Examples===

Revision as of 13:25, 24 March 2017

{{subst:Description:JSimpleXMLElement}}

Defined in

libraries/joomla/utilities/simplexml.php

Methods

Method name Description
__construct Constructor, sets up all the default values
name Get the name of the element
attributes Get the an attribute of the element
data Get the data of the element
setData Set the data of the element
children Get the children of the element
level Get the level of the element
addAttribute Adds an attribute to the element
removeAttribute Removes an attribute from the element
addChild Adds a direct child to the element
removeChild
getElementByPath Get an element in the document by / separated path
map traverses the tree calling the $callback( JSimpleXMLElement $this, mixed $args=array() ) function with each JSimpleXMLElement.
toString Return a well-formed XML string based on SimpleXML element

Importing

jimport( 'joomla.utilities.simplexml' );


{{subst:SeeAlso:JSimpleXMLElement}}

Examples

<CodeExamplesForm />