Name
DocumentType: the DTD of an XML document — DOM Level 1 XML: Node → DocumentType
Properties
readonly String internalSubset[DOM Level 2]The unparsed text of 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 String publicId[DOM Level 2]The public identifier of the external subset of the DTD, or
nullif none is specified.readonly String systemId[DOM Level 2]The system identifier of the external subset of the DTD, or
nullif none is 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.
Although the W3C DOM includes an API for accessing the XML entities and notations defined in a DTD, that API is not documented here. Typical web browsers do not parse the DTDs for the documents they load, and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access