DOM DOMXPath 클래스

(PHP 5, PHP 7, PHP 8)


소개

XPath 1.0 지원


클래스 개요

                  
class DOMXPath {

  /* Properties */
  public readonly DOMDocument $document;
  public bool $registerNodeNamespaces;

  /* Methods */
  public __construct(DOMDocument $document, bool $registerNodeNS = true)
  public evaluate(string $expression, ?DOMNode $contextNode = null, bool $registerNodeNS = true): mixed
  public query(string $expression, ?DOMNode $contextNode = null, bool $registerNodeNS = true): mixed
  public registerNamespace(string $prefix, string $namespace): bool
  public registerPhpFunctions(string|array|null $restrict = null): void
}
                  
                

Properties

document
registerNodeNamespaces
true로 설정하면 노드의 네임스페이스가 등록됩니다.

변경 로그

버전 설명
8.0.0 registerNodeNamespaces 속성이 추가되었습니다.

목차