La classe DOMCharacterData

(PHP 5, PHP 7, PHP 8)

Introduction

Représente un nœud contenant des données. Aucun nœud ne correspond à cette classe, mais d'autres nœuds en hérite.

Synopsis de la classe

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
}

Propriétés

data

Le contenu du nœud.

length

La taille du contenu.

nextElementSibling

L'élément frère suivant ou null.

previousElementSibling

L'élément frère précédent ou null.

Historique

VersionDescription
8.0.0 Les propriétés nextElementSibling et previousElementSibling ont été ajoutées.
8.0.0DOMCharacterData implémente désormais DOMChildNode.

Sommaire

To Top