PHP Class SimpleXMLReader

Author: Dmitry Pyatkov(aka dkrnl) ([email protected])
Inheritance: extends XMLReader
Afficher le fichier Open project: dkrnl/simplexmlreader

Méthodes publiques

Свойство Type Description
$preserveWhiteSpace boolean Do not remove redundant white space.

Protected Properties

Свойство Type Description
$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

Méthodes publiques

Méthode Description
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

Method Details

currentXpath() public méthode

Return current xpath node
public currentXpath ( boolean $nodesCounter = false ) : string
$nodesCounter boolean
Résultat string

expandDomDocument() public méthode

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

expandSimpleXml() public méthode

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
Résultat SimpleXMLElement

expandString() public méthode

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
Résultat SimpleXMLElement

expandXpath() public méthode

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
Résultat array(SimpleXMLElement)

parse() public méthode

Run parser
public parse ( ) : void
Résultat void

read() public méthode

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

registerCallback() public méthode

Add node callback
public registerCallback ( string $xpath, callback $callback, integer $nodeType = XMLREADER::ELEMENT ) : SimpleXMLReader
$xpath string
$callback callback
$nodeType integer
Résultat SimpleXMLReader

unRegisterCallback() public méthode

Remove node callback
public unRegisterCallback ( string $xpath, integer $nodeType = XMLREADER::ELEMENT ) : SimpleXMLReader
$xpath string
$nodeType integer
Résultat SimpleXMLReader

Property Details

$callback protected_oe property

Callbacks
protected array $callback
Résultat array

$currentDepth protected_oe property

Depth
protected int $currentDepth
Résultat integer

$nodesCounter protected_oe property

Stack of node position
protected array $nodesCounter
Résultat array

$nodesParsed protected_oe property

Stack of the parsed nodes
protected array $nodesParsed
Résultat array

$nodesType protected_oe property

Stack of the node types
protected array $nodesType
Résultat array

$preserveWhiteSpace public_oe property

Do not remove redundant white space.
public bool $preserveWhiteSpace
Résultat boolean

$prevDepth protected_oe property

Previos depth
protected int $prevDepth
Résultat integer