|
PHP5中文手册
DOMXPath->query()(No version information available, might be only in CVS) DOMXPath->query() — Evaluates the given XPath expression 说明DOMXPath
DOMNodeList query
( string $expression
[, DOMNode $contextnode
] )
Executes the given XPath expression . 参数
返回值Returns a DOMNodeList containing all nodes matching the given XPath expression . Any expression which do not return nodes will return an empty DOMNodeList. 范例
Example#1 Getting all the english books
<?php 上例将输出:
We can also use the contextnode parameter to shorten our expression:
<?php |