PHP Класс SimpleXMLReader

Автор: Dmitry Pyatkov(aka dkrnl) ([email protected])
Наследование: extends XMLReader
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$preserveWhiteSpace boolean Do not remove redundant white space.

Защищенные свойства (Protected)

Свойство Тип Описание
$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