\Phool\XMLXPage

Summary

Methods
Properties
Constants
__construct()
nodes()
node()
lastNode()
values()
value()
nb()
aInfo()
recursiveBackNodes()
recursiveBackNode()
recursiveBackValues()
recursiveBackValue()
$xdoc
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$xdoc

$xdoc : string

Type

string — Buffer containing the document public $page;

Methods

__construct()

__construct(string  $data, boolean  $html = true) 

Creates the DOM instance and imports the data

Parameters

string $data

The content of the page/document

boolean $html

Is the format html (or xml) ?

Throws

\Phool\XML\DOMException

nodes()

nodes(string  $xpath,   $base = null) 

Returns a list of nodes corresponding to an XPath

Parameters

string $xpath

The xpath string

$base

node()

node(string  $xpath,   $base = null) 

Returns the first node corresponding to an XPath

Parameters

string $xpath

The xpath string

$base

lastNode()

lastNode(string  $xpath,   $base = null) 

Returns the last node corresponding to an XPath

Parameters

string $xpath

The xpath string

$base

values()

values(string  $xpath,   $base = null) 

Returns the values of the nodes corresponding to an XPath (nodeValue)

Parameters

string $xpath

The xpath string

$base

value()

value(string  $xpath,   $base = null) 

Returns the value of the first node corresponding to an XPath (nodeValue)

Parameters

string $xpath

The xpath string

$base

nb()

nb(string  $xpath,   $base = null) 

Returns the number of nodes corresponding to an XPath (nodeValue)

Parameters

string $xpath

The xpath string

$base

aInfo()

aInfo(\Phool\XML\DOMNode  $node) 

Returns the text and target of an hyperlink node as an array('text' => <text>, 'url' => <target>)

Parameters

\Phool\XML\DOMNode $node

Node of type 'a'

Throws

\Phool\XML\Exception

recursiveBackNodes()

recursiveBackNodes(  $start_node,   $item) 

Parameters

$start_node
$item

recursiveBackNode()

recursiveBackNode(  $start_node,   $item) 

Parameters

$start_node
$item

recursiveBackValues()

recursiveBackValues(  $start_node,   $item) 

Parameters

$start_node
$item

recursiveBackValue()

recursiveBackValue(  $start_node,   $item) 

Parameters

$start_node
$item