DekGenius.com
Team LiB   Previous Section   Next Section
DocumentType the DTD of an XML document

Availability

DOM Level 1 XML

Inherits from/Overrides

Node figs/U2192.gif DocumentType

Properties

readonly NamedNodeMap entities

This NamedNodeMap is a list of Entity objects declared in the DTD and allows Entity objects to be queried by name. Note that XML parameter entities are not included. This NamedNodeMap is immutable -- its contents may not be altered.

readonly String internalSubset [DOM Level 2]

The internal subset of the DTD (i.e., the portion of the DTD that appears in the document itself rather than in an external file). The delimiting square brackets of the internal subset are not part of the returned value. If there is no internal subset, this property is null.

readonly String name

The name of the document type. This is the identifier that immediately follows <!DOCTYPE> at the start of an XML document, and it is the same as the tag name of the document's root element.

readonly NamedNodeMap notations

A NamedNodeMap that contains Notation objects representing all notations declared in the DTD. It also allows Notation objects to be looked up by notation name. This NamedNodeMap is immutable -- its contents may not be altered.

readonly String publicId [DOM Level 2]

The public identifier of the external subset of the DTD, or null if none was specified.

readonly String systemId [DOM Level 2]

The system identifier of the external subset of the DTD, or null if none was specified.

Description

This infrequently used interface represents the DTD of an XML document. Programmers working exclusively with HTML documents never need to use this interface.

Because a DTD is not part of a document's content, DocumentType nodes never appear in the document tree. If an XML document has a DTD, the DocumentType node for that DTD is available through the doctype property of the Document node.

DocumentType nodes are immutable and may not be modified in any way.

See Also

Document, Entity, Notation

Type of

Document.doctype

Passed to

DOMImplementation.createDocument( )

Returned by

DOMImplementation.createDocumentType( )

    Team LiB   Previous Section   Next Section