The DOMDocumentType class

(PHP 5, PHP 7, PHP 8)

Introduction

Each DOMDocument has a doctype attribute whose value is either null or a DOMDocumentType object.

Class synopsis

classDOMDocumentTypeextendsDOMNode {
publicreadonlystring$name;
publicreadonlystring$publicId;
publicreadonlystring$systemId;
publicreadonly?string$internalSubset;
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;
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
}

Properties

publicId

The public identifier of the external subset.

systemId

The system identifier of the external subset. This may be an absolute URI or not.

name

The name of DTD; i.e., the name immediately following the DOCTYPE keyword.

entities

A DOMNamedNodeMap containing the general entities, both external and internal, declared in the DTD.

notations

A DOMNamedNodeMap containing the notations declared in the DTD.

internalSubset

The internal subset as a string, or null if there is none. This does not contain the delimiting square brackets.

To Top