public interface DocumentType
implements Node
| org.w3c.dom.DocumentType |
每个Document都有一个doctype属性,其值为null或DocumentType对象。 DOM Core中的DocumentType接口为文档定义的实体列表提供了一个接口, DocumentType几乎没有其他因素,因为在撰写本文时,名称空间和各种XML模式努力对DTD表示的影响尚不清楚。
DOM级别3不支持编辑DocumentType节点。 DocumentType节点是只读的。
另见 Document Object Model (DOM) Level 3 Core Specification 。
Inherited constants |
|---|
org.w3c.dom.Node
|
公共方法(Public methods) |
|
|---|---|
abstract NamedNodeMap |
getEntities() 包含DTD中声明的一般实体(包括外部和内部实体)的 |
abstract String |
getInternalSubset() 内部子集作为字符串,或者 |
abstract String |
getName() DTD的名称; 即紧随 |
abstract NamedNodeMap |
getNotations() 包含在DTD中声明的符号的 |
abstract String |
getPublicId() 外部子集的公共标识符。 |
abstract String |
getSystemId() 外部子集的系统标识符。 |
继承方法(Inherited methods) |
|
|---|---|
org.w3c.dom.Node
|
|
NamedNodeMap getEntities ()
包含DTD中声明的外部和内部常规实体的NamedNodeMap 。 不包含参数实体。 丢弃重复项。 例如在:
<!DOCTYPE ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz"> ]> <ex/>the interface provides access to
foo and the first declaration of
bar but not the second declaration of
bar or
baz. Every node in this map also implements the
Entity interface.
entities cannot be altered in any way.
| 返回(Returns) | |
|---|---|
NamedNodeMap |
|
String getInternalSubset ()
内部子集作为字符串,或者null如果没有)。 这不包含分隔方括号。
注意:返回的实际内容取决于实现可用的信息量。 这可能取决于各种参数,包括用于构建文档的XML处理器。
| 返回(Returns) | |
|---|---|
String |
|
NamedNodeMap getNotations ()
包含在DTD中声明的符号的NamedNodeMap 。 丢弃重复项。 该地图中的每个节点也实现了Notation接口。
DOM级别2不支持编辑符号,因此notations不能以任何方式改变。
| 返回(Returns) | |
|---|---|
NamedNodeMap |
|