JSimpleXMLElement
SimpleXML Element
This object stores all of the direct children of itself in the $children array. They are also stored by type as arrays. So, if, for example, this tag had 2 <font> tags as children, there would be a class member called $font created as an array. $font[0] would be the first font tag, and $font[1] would be the second.
To loop through all of the direct children of this object, the $children member should be used.
To loop through all of the direct children of a specific tag for this object, it is probably easier to use the arrays of the specific tag names, as explained above.
Located in /joomla/utilities/simplexml.php (line 357)
JObject (Subpackage Base)
![]()
JSimpleXMLElement (Subpackage Utilities)
![](../../media/images/Variable.png)
Array with the attributes of this XML element
![](../../media/images/Variable.png)
Array of references to the objects of all direct children of this XML object
![](../../media/images/Variable.png)
The data the element contains
![](../../media/images/Variable.png)
The level of this XML element
![](../../media/images/Variable.png)
The name of the element
Constructor, sets up all the default values
- string $name
- array $attrs
- int $parents
- $level
- JObject::__construct()
- Class constructor, overridden in descendant classes.
Adds an attribute to the element
- string $name
- array $attrs
- $value
Adds a direct child to the element
- string $name
- array $attrs
- int $level
Return a well-formed XML string based on SimpleXML element
- $whitespace
Get the an attribute of the element
- string $attribute: The name of the attribute
Get an element in the document by / separated path
- string $path: The / separated path to the element
Removes an attribute from the element
- string $name
Inherited Methods
Inherited From JObject
JObject::JObject()
JObject::__construct()
JObject::get()
JObject::getPublicProperties()
JObject::set()
JObject::toString()
Documentation generated on Mon, 05 Mar 2007 21:25:21 +0000 by phpDocumentor 1.3.1