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
null
if none is specified.readonly String systemId
[DOM Level 2]The system identifier of the external subset of the DTD, or
null
if 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, ...
Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.