La clase DOMCharacterData

(PHP 5, PHP 7, PHP 8)

Introducción

Representa nodos con datos de caracteres. Ningún nodo corresponde directamente a esta clase pero otros nodos pueden heredar de ella.

Sinopsis de la Clase

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
}

Propiedades

data

El contenido del nodo.

length

La longitud del contenido.

nextElementSibling

The next sibling element or null.

previousElementSibling

The previous sibling element or null.

Historial de cambios

VersiónDescripción
8.0.0 The nextElementSibling and previousElementSibling properties have been added.
8.0.0DOMCharacterData implements DOMChildNode now.

Tabla de contenidos

To Top