PHP Class Prado\Xml\TXmlElement
TXmlElement represents an XML element node.
You can obtain its tag-name, attributes, text between the opening and closing
tags via the TagName, Attributes, and Value properties, respectively.
You can also retrieve its parent and child elements by Parent and Elements
properties, respectively.
TBD: xpath
Mostra file
Open project: pradosoft/prado
Class Usage Examples
Public Methods
Private Methods
Method Details
__construct()
public method
__toString()
public method
$element = new TXmlElement('tag');
echo $element;
or
$element = new TXmlElement('tag');
$xml = (string)$element;
getAttribute()
public method
getAttributes()
public method
public getAttributes ( ) : TMap |
return |
Prado\Collections\TMap |
list of attributes |
getElementByTagName()
public method
public getElementByTagName ( $tagName ) : TXmlElement |
return |
TXmlElement |
the first child element that has the specified tag-name, null if not found |
getElements()
public method
public getElements ( ) : TXmlElementList |
return |
TXmlElementList |
list of child elements |
getElementsByTagName()
public method
public getElementsByTagName ( $tagName ) : Prado\Collections\TList |
return |
Prado\Collections\TList |
list of all child elements that have the specified tag-name |
getHasAttribute()
public method
getHasElement()
public method
getParent()
public method
public getParent ( ) : TXmlElement |
return |
TXmlElement |
parent element of this element |
getTagName()
public method
public getValue ( ) : string |
return |
string |
text enclosed between opening and closing tag of this element |
setAttribute()
public method
setParent()
public method
setTagName()
public method