php8.5
Home/ Manual/ dom / dom/ The Dom\Node class

The Dom\Node class

This is the modern, spec-compliant equivalent of DOMNode.

Intro

This is the modern, spec-compliant equivalent of DOMNode.

Class synopsis

class Dom\Node { }

Predefined Constants

Properties

nodeName

Returns the most accurate name for the current node type.

  • For elements, this is the HTML-uppercased qualified name.
  • For attributes, this is the qualified name.
  • For processing instructions, this is the target.
  • For document type nodes, this is the name.
ownerDocument

The Dom\Document object associated with this node, or null if this node is a document.

childNodes

A Dom\NodeList that contains all children of this node. If there are no children, this is an empty Dom\NodeList.

nodeValue

The value of this node, depending on its type.

Notes Utf8

See Also

  • WHATWG specification of Node

Source: reference/dom/dom/dom-node.xml · from the official PHP manual (php/doc-en)