PHP 클래스 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
부터: 3.0
저자: Qiang Xue ([email protected])
상속: extends Prado\TComponent
파일 보기 프로젝트 열기: pradosoft/prado 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( $tagName ) Constructor.
__toString ( ) : string Magic-method override. Called whenever this element is used as a string.
getAttribute ( $name ) : string
getAttributes ( ) : TMap
getElementByTagName ( $tagName ) : TXmlElement
getElements ( ) : TXmlElementList
getElementsByTagName ( $tagName ) : Prado\Collections\TList
getHasAttribute ( ) : boolean
getHasElement ( ) : boolean
getParent ( ) : TXmlElement
getTagName ( ) : string
getValue ( ) : string
setAttribute ( $name, $value )
setParent ( $parent )
setTagName ( $tagName )
setValue ( $value )
toString ( $indent ) : string

비공개 메소드들

메소드 설명
xmlEncode ( $str )

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( $tagName )

__toString() 공개 메소드

$element = new TXmlElement('tag'); echo $element; or $element = new TXmlElement('tag'); $xml = (string)$element;
public __toString ( ) : string
리턴 string string representation of this element

getAttribute() 공개 메소드

public getAttribute ( $name ) : string
리턴 string the attribute specified by the name, null if no such attribute

getAttributes() 공개 메소드

public getAttributes ( ) : TMap
리턴 Prado\Collections\TMap list of attributes

getElementByTagName() 공개 메소드

public getElementByTagName ( $tagName ) : TXmlElement
리턴 TXmlElement the first child element that has the specified tag-name, null if not found

getElements() 공개 메소드

public getElements ( ) : TXmlElementList
리턴 TXmlElementList list of child elements

getElementsByTagName() 공개 메소드

public getElementsByTagName ( $tagName ) : Prado\Collections\TList
리턴 Prado\Collections\TList list of all child elements that have the specified tag-name

getHasAttribute() 공개 메소드

public getHasAttribute ( ) : boolean
리턴 boolean true if this element has attributes

getHasElement() 공개 메소드

public getHasElement ( ) : boolean
리턴 boolean true if this element has child elements

getParent() 공개 메소드

public getParent ( ) : TXmlElement
리턴 TXmlElement parent element of this element

getTagName() 공개 메소드

public getTagName ( ) : string
리턴 string tag-name of this element

getValue() 공개 메소드

public getValue ( ) : string
리턴 string text enclosed between opening and closing tag of this element

setAttribute() 공개 메소드

public setAttribute ( $name, $value )

setParent() 공개 메소드

public setParent ( $parent )

setTagName() 공개 메소드

public setTagName ( $tagName )

setValue() 공개 메소드

public setValue ( $value )

toString() 공개 메소드

public toString ( $indent ) : string
리턴 string string representation of this element