DOMXPath クラス

(PHP 5, PHP 7, PHP 8)

はじめに

XPath 1.0 をサポートします。

クラス概要

classDOMXPath {
publicreadonlyDOMDocument$document;
public__construct(DOMDocument$document, bool$registerNodeNS = true)
publicevaluate(string$expression, ?DOMNode$contextNode = null, bool$registerNodeNS = true): mixed
publicquery(string$expression, ?DOMNode$contextNode = null, bool$registerNodeNS = true): mixed
publicregisterNamespace(string$prefix, string$namespace): bool
}

プロパティ

document

registerNodeNamespaces

true に設定すると、ノードの名前空間が登録されます。

変更履歴

バージョン説明
8.0.0 プロパティ registerNodeNamespaces が追加されました。

目次

To Top