# Poco::XML

# class DocumentType

Library: XML
Package: DOM
Header: Poco/DOM/DocumentType.h

## Description

Each Document has a doctype attribute whose value is either null or a DocumentType object. The DocumentType interface in the DOM Level 1 Core provides an interface to the list of entities that are defined for the document, and little else because the effect of namespaces and the various XML scheme efforts on DTD representation are not clearly understood as of this writing.

The DOM Level 1 doesn't support editing DocumentType nodes.

## Inheritance

Direct Base Classes: AbstractContainerNode

All Base Classes: AbstractContainerNode, AbstractNode, DOMObject, EventTarget, Node

## Member Summary

Member Functions: copyNode, entities, internalSubset, name, nodeName, nodeType, notations, publicId, systemId

Inherited Functions: addEventListener, appendChild, attributes, autoRelease, bubbleEvent, captureEvent, childNodes, cloneNode, copyNode, dispatchAttrModified, dispatchCharacterDataModified, dispatchEvent, dispatchNodeInserted, dispatchNodeInsertedIntoDocument, dispatchNodeRemoved, dispatchNodeRemovedFromDocument, dispatchSubtreeModified, duplicate, events, eventsSuspended, firstChild, getNodeValue, hasAttributes, hasChildNodes, innerText, insertBefore, isSupported, lastChild, localName, namespaceURI, nextSibling, nodeName, nodeType, nodeValue, normalize, ownerDocument, parentNode, prefix, previousSibling, release, removeChild, removeEventListener, replaceChild, setNodeValue, setOwnerDocument

## Constructors

### DocumentType

DocumentType(
Document * pOwner,
const DocumentType & dt
);

### DocumentType

DocumentType(
Document * pOwner,
const XMLString & name,
const XMLString & publicId,
const XMLString & systemId
);

## Destructor

### ~DocumentType

~DocumentType();

## Member Functions

### entities

NamedNodeMap * entities() const;

A NamedNodeMap containing the general entities, both external and internal, declared in the DTD. Duplicates are discarded.

Note: In this implementation, only the external entities are reported. Every node in this map also implements the Entity interface.

The returned NamedNodeMap must be released with a call to release() when no longer needed.

### internalSubset

const XMLString & internalSubset() const;

Returns the internal DTD subset. This implementation returns an empty string.

### name

const XMLString & name() const;

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

### nodeName

const XMLString & nodeName() const;

See also: Poco::XML::AbstractNode::nodeName()

### nodeType

unsigned short nodeType() const;

See also: Poco::XML::Node::nodeType()

### notations

NamedNodeMap * notations() const;

A NamedNodeMap containing the notations declared in the DTD. Duplicates are discarded. Every node in this map also implements the Notation interface. The DOM Level 1 does not support editing notations, therefore notations cannot be altered in any way.

The returned NamedNodeMap must be released with a call to release() when no longer needed.

### publicId

const XMLString & publicId() const;

Returns the public identifier of the external DTD subset.

### systemId

const XMLString & systemId() const;

Returns the system identifier of the external DTD subset.

### copyNode

Node * copyNode(
bool deep,
Document * pOwnerDocument
) const;

See also: Poco::XML::AbstractNode::copyNode()