PHP 클래스 SimpleXMLReader

저자: Dmitry Pyatkov(aka dkrnl) ([email protected])
상속: extends XMLReader
파일 보기 프로젝트 열기: dkrnl/simplexmlreader

공개 프로퍼티들

프로퍼티 타입 설명
$preserveWhiteSpace boolean Do not remove redundant white space.

보호된 프로퍼티들

프로퍼티 타입 설명
$callback array Callbacks
$currentDepth integer Depth
$nodesCounter array Stack of node position
$nodesParsed array Stack of the parsed nodes
$nodesType array Stack of the node types
$prevDepth integer Previos depth

공개 메소드들

메소드 설명
currentXpath ( boolean $nodesCounter = false ) : string Return current xpath node
expandDomDocument ( string $version = "1.0", string $encoding = "UTF-8" ) : DomDocument Expand current node to DomDocument
expandSimpleXml ( string $version = "1.0", string $encoding = "UTF-8", string $className = null ) : SimpleXMLElement Expand current node to SimpleXMLElement
expandString ( string $version = "1.0", string $encoding = "UTF-8", string $className = null ) : SimpleXMLElement Expand current node to string
expandXpath ( string $path, string $version = "1.0", string $encoding = "UTF-8", string $className = null ) : array(SimpleXMLElement) Run XPath query on current node
parse ( ) : void Run parser
read ( ) : boolean Moves cursor to the next node in the document.
registerCallback ( string $xpath, callback $callback, integer $nodeType = XMLREADER::ELEMENT ) : SimpleXMLReader Add node callback
unRegisterCallback ( string $xpath, integer $nodeType = XMLREADER::ELEMENT ) : SimpleXMLReader Remove node callback

메소드 상세

currentXpath() 공개 메소드

Return current xpath node
public currentXpath ( boolean $nodesCounter = false ) : string
$nodesCounter boolean
리턴 string

expandDomDocument() 공개 메소드

Expand current node to DomDocument
public expandDomDocument ( string $version = "1.0", string $encoding = "UTF-8" ) : DomDocument
$version string
$encoding string
리턴 DomDocument

expandSimpleXml() 공개 메소드

Expand current node to SimpleXMLElement
public expandSimpleXml ( string $version = "1.0", string $encoding = "UTF-8", string $className = null ) : SimpleXMLElement
$version string
$encoding string
$className string
리턴 SimpleXMLElement

expandString() 공개 메소드

Expand current node to string
public expandString ( string $version = "1.0", string $encoding = "UTF-8", string $className = null ) : SimpleXMLElement
$version string
$encoding string
$className string
리턴 SimpleXMLElement

expandXpath() 공개 메소드

Run XPath query on current node
public expandXpath ( string $path, string $version = "1.0", string $encoding = "UTF-8", string $className = null ) : array(SimpleXMLElement)
$path string
$version string
$encoding string
$className string
리턴 array(SimpleXMLElement)

parse() 공개 메소드

Run parser
public parse ( ) : void
리턴 void

read() 공개 메소드

Moves cursor to the next node in the document.
public read ( ) : boolean
리턴 boolean Returns TRUE on success or FALSE on failure.

registerCallback() 공개 메소드

Add node callback
public registerCallback ( string $xpath, callback $callback, integer $nodeType = XMLREADER::ELEMENT ) : SimpleXMLReader
$xpath string
$callback callback
$nodeType integer
리턴 SimpleXMLReader

unRegisterCallback() 공개 메소드

Remove node callback
public unRegisterCallback ( string $xpath, integer $nodeType = XMLREADER::ELEMENT ) : SimpleXMLReader
$xpath string
$nodeType integer
리턴 SimpleXMLReader

프로퍼티 상세

$callback 보호되어 있는 프로퍼티

Callbacks
protected array $callback
리턴 array

$currentDepth 보호되어 있는 프로퍼티

Depth
protected int $currentDepth
리턴 integer

$nodesCounter 보호되어 있는 프로퍼티

Stack of node position
protected array $nodesCounter
리턴 array

$nodesParsed 보호되어 있는 프로퍼티

Stack of the parsed nodes
protected array $nodesParsed
리턴 array

$nodesType 보호되어 있는 프로퍼티

Stack of the node types
protected array $nodesType
리턴 array

$preserveWhiteSpace 공개적으로 프로퍼티

Do not remove redundant white space.
public bool $preserveWhiteSpace
리턴 boolean

$prevDepth 보호되어 있는 프로퍼티

Previos depth
protected int $prevDepth
리턴 integer