The DOMCharacterData class

(PHP 5, PHP 7, PHP 8)

Einführung

Represents nodes with character data. No nodes directly correspond to this class, but other nodes do inherit from it.

Klassenbeschreibung

classDOMCharacterDataextendsDOMNodeimplementsDOMChildNode {
publicreadonlyint$length;
publicreadonlystring$nodeName;
publicreadonlyint$nodeType;
publicreadonly?DOMNode$parentNode;
publicreadonly?DOMElement$parentElement;
publicreadonlyDOMNodeList$childNodes;
publicreadonly?DOMNode$firstChild;
publicreadonly?DOMNode$lastChild;
publicreadonly?DOMNode$previousSibling;
publicreadonly?DOMNode$nextSibling;
publicreadonlybool$isConnected;
publicreadonly?string$namespaceURI;
publicreadonly?string$localName;
publicreadonly?string$baseURI;
publicafter(DOMNode|string...$nodes): void
publicappendData(string$data): true
publicbefore(DOMNode|string...$nodes): void
publicdeleteData(int$offset, int$count): bool
publicinsertData(int$offset, string$data): bool
publicremove(): void
publicreplaceData(int$offset, int$count, string$data): bool
publicreplaceWith(DOMNode|string...$nodes): void
publicsubstringData(int$offset, int$count): string|false
publicDOMNode::C14N(
    bool$exclusive = false,
    bool$withComments = false,
    ?array$xpath = null,
    ?array$nsPrefixes = null
): string|false
publicDOMNode::C14NFile(
    string$uri,
    bool$exclusive = false,
    bool$withComments = false,
    ?array$xpath = null,
    ?array$nsPrefixes = null
): int|false
publicDOMNode::isSameNode(DOMNode$otherNode): bool
publicDOMNode::isSupported(string$feature, string$version): bool
}

Eigenschaften

data

The contents of the node.

length

The length of the contents.

nextElementSibling

The next sibling element or null.

previousElementSibling

The previous sibling element or null.

Changelog

VersionBeschreibung
8.0.0 The nextElementSibling and previousElementSibling properties have been added.
8.0.0DOMCharacterData implements DOMChildNode now.

Inhaltsverzeichnis

To Top