The DOMText class

Introduction

The DOMText class inherits from DOMCharacterData and represents the textual content of a DOMElement or DOMAttr.

Class synopsis

DOMText
extends DOMCharacterData
/* Properties */
public readonly string $wholeText;
/* Inherited properties */
public string $data;
public readonly int $length;
public readonly DOMElementnull $previousElementSibling;
public readonly DOMElementnull $nextElementSibling;
public readonly string $nodeName;
public stringnull $nodeValue;
public readonly int $nodeType;
public readonly DOMNodenull $parentNode;
public readonly DOMElementnull $parentElement;
public readonly DOMNodeList $childNodes;
public readonly DOMNodenull $firstChild;
public readonly DOMNodenull $lastChild;
public readonly DOMNodenull $previousSibling;
public readonly DOMNodenull $nextSibling;
public readonly DOMNamedNodeMapnull $attributes;
public readonly bool $isConnected;
public readonly DOMDocumentnull $ownerDocument;
public readonly stringnull $namespaceURI;
public string $prefix;
public readonly stringnull $localName;
public readonly stringnull $baseURI;
public string $textContent;
/* Methods */
public DOMText::__construct(string $data = "")
public bool DOMText::isElementContentWhitespace()
public bool DOMText::isWhitespaceInElementContent()
public DOMTextfalse DOMText::splitText(int $offset)
/* Inherited methods */
public void after(DOMNodestring ...$nodes)
public true appendData(string $data)
public void before(DOMNodestring ...$nodes)
public bool deleteData(int $offset, int $count)
public bool insertData(int $offset, string $data)
public void remove()
public bool replaceData(int $offset, int $count, string $data)
public void replaceWith(DOMNodestring ...$nodes)
public stringfalse substringData(int $offset, int $count)
public DOMNodefalse DOMNode::appendChild(DOMNode $node)
public stringfalse DOMNode::C14N(
    bool $exclusive = false,
    bool $withComments = false,
    arraynull $xpath = null,
    arraynull $nsPrefixes = null
)
public intfalse DOMNode::C14NFile(
    string $uri,
    bool $exclusive = false,
    bool $withComments = false,
    arraynull $xpath = null,
    arraynull $nsPrefixes = null
)
public DOMNodefalse DOMNode::cloneNode(bool $deep = false)
public bool DOMNode::contains(DOMNodeDOMNameSpaceNodenull $other)
public int DOMNode::getLineNo()
public stringnull DOMNode::getNodePath()
public DOMNode DOMNode::getRootNode(arraynull $options = null)
public bool DOMNode::hasAttributes()
public bool DOMNode::hasChildNodes()
public DOMNodefalse DOMNode::insertBefore(DOMNode $node, DOMNodenull $child = null)
public bool DOMNode::isDefaultNamespace(string $namespace)
public bool DOMNode::isEqualNode(DOMNodenull $otherNode)
public bool DOMNode::isSameNode(DOMNode $otherNode)
public bool DOMNode::isSupported(string $feature, string $version)
public stringnull DOMNode::lookupNamespaceURI(stringnull $prefix)
public stringnull DOMNode::lookupPrefix(string $namespace)
public void DOMNode::normalize()
public DOMNodefalse DOMNode::removeChild(DOMNode $child)
public DOMNodefalse DOMNode::replaceChild(DOMNode $node, DOMNode $child)

Properties

wholeText

Holds all the text of logically-adjacent (not separated by Element, Comment or Processing Instruction) Text nodes.

Changelog

Version Description
8.0.0 The unimplemented method DOMText::replaceWholeText has been removed.
Table of Contents