BlueSpice MediaWiki master
|
Public Member Functions | |
__construct (DOMDocument $doc) | |
registerNamespace ($prefix, $namespaceURI) | |
query ($expression, $contextnode=null) | |
evaluate ($expression, $contextnode=null) | |
registerPhpFunctions ($restrict=null) | |
Public Attributes | |
$document | |
The DOMXPath class (supports XPath 1.0) http://php.net/manual/en/class.domxpath.php
DOMXPath::__construct | ( | DOMDocument | $doc | ) |
Creates a new <classname>DOMXPath</classname> object DOMDocument $doc The DOMDocument</classname> associated with the <classname>DOMXPath</classname>.
DOMXPath::evaluate | ( | $expression, | |
$contextnode = null |
|||
) |
Evaluates the given XPath expression and returns a typed result if possible. string $expression The XPath expression to execute.
DOMNode | $contextnode | [optional] |
The optional contextnode can be specified for doing relative XPath queries. By default, the queries are relative to the root element.
DOMXPath::query | ( | $expression, | |
$contextnode = null |
|||
) |
Evaluates the given XPath expression string $expression The XPath expression to execute.
DOMNode | $contextnode | [optional] |
The optional contextnode can be specified for doing relative XPath queries. By default, the queries are relative to the root element.
DOMXPath::registerNamespace | ( | $prefix, | |
$namespaceURI | |||
) |
Registers the namespace with the <classname>DOMXPath</classname> object string $prefix The prefix.
string | $namespaceURI |
The URI of the namespace.
DOMXPath::registerPhpFunctions | ( | $restrict = null | ) |
Register PHP functions as XPath functions mixed $restrict [optional] Use this parameter to only allow certain functions to be called from XPath.
This parameter can be either a string (a function name) or an array of function names.