array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'domxpath.registernamespace.php', 1 => 'DOMXPath::registerNamespace', 2 => 'Registers the namespace with the DOMXPath object', ), 'up' => array ( 0 => 'class.domxpath.php', 1 => 'DOMXPath', ), 'prev' => array ( 0 => 'domxpath.quote.php', 1 => 'DOMXPath::quote', ), 'next' => array ( 0 => 'domxpath.registerphpfunctionns.php', 1 => 'DOMXPath::registerPhpFunctionNS', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/dom/domxpath/registernamespace.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

DOMXPath::registerNamespace

(PHP 5, PHP 7, PHP 8)

DOMXPath::registerNamespace Registers the namespace with the DOMXPath object

说明

public DOMXPath::registerNamespace(string $prefix, string $namespace): bool

Registers the namespace and prefix with the DOMXPath object.

参数

prefix

The prefix.

namespace

The URI of the namespace.

返回值

成功时返回 true, 或者在失败时返回 false