public interface DOMImplementation
DOMImplementation
接口的执行是独立于任何特定的实例文档对象模型的操作提供一些方法。
Modifier and Type | Method and Description |
---|---|
Document |
createDocument(String namespaceURI, String qualifiedName, DocumentType doctype)
创建一个指定类型的文档元素的DOM文档对象。
|
DocumentType |
createDocumentType(String qualifiedName, String publicId, String systemId)
创建一个空的
DocumentType 节点。
|
Object |
getFeature(String feature, String version)
此方法返回一个专门的对象实施专门指定功能的版本的API,为指定的
DOM Features。
|
boolean |
hasFeature(String feature, String version)
测试如果DOM实现实现特定的功能和版本,按
DOM Features。
|
boolean hasFeature(String feature, String version)
feature
特征的名字来测试。
version
-这是测试功能的版本号。
true
如果特征是指定的版本实现,
false
否则。
DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) throws DOMException
DocumentType
节点。实体声明和符号是没有可用的。实体引用扩展和默认属性添加不发生。
qualifiedName
-文档类型来创建合格的名字。
publicId
-外部子集公共标识符。
systemId
-外部子集系统标识符。
Node.ownerDocument
设置
null
DocumentType
节点。
DOMException
- invalid_character_err:如果按[
XML 1.0 ]指定的名称不是XML的名字了。
qualifiedName
畸形凸起。
Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype) throws DOMException
DocumentType
,实施专业
Document
可以实例化对象的支持比“核心”的附加功能,如“HTML”[
DOM Level 2 HTML ]。另一方面,设置
DocumentType
后文档的创建使这不太可能发生。另外,专业
Document
创作方法,如
createHTMLDocument
[
DOM Level 2 HTML ],可以用来获得
Document
对象的具体类型。
namespaceURI
-文档元素创建或
null
命名空间URI。
qualifiedName
-文档元素的限定名来创建或
null
。
doctype
-要创建或
null
文档类型。当
doctype
不
null
,其
Node.ownerDocument
属性设置为在创建的文件。
Document
对象。如果
NamespaceURI
,
qualifiedName
,和
doctype
是
null
,返回的
Document
是空的没有文档元素。
DOMException
- invalid_character_err:如果按[
XML 1.0 ]指定的名称不是XML的名字了。
qualifiedName
畸形了,如果
qualifiedName
有前缀和
namespaceURI
是
null
,或者如果
qualifiedName
是
null
和
namespaceURI
不同于
null
,或者如果
qualifiedName
有前缀是“XML”和
namespaceURI
不同于“
http://www.w3.org/XML/1998/namespace”[
XML Namespaces ],或如果DOM实现不支持z-79f20但72a-7c6f-490a-a0e9-fb2b433e4e08特征提供了一个非空的命名空间URI命名空间的XML定义了自。
doctype
已经使用一个不同的文件或是来自不同的实现创造了。
Object getFeature(String feature, String version)
DOMImplementation
接口。
feature
特征的名称要求。注意任何加号“+”添加到特征的名称将被忽略,因为它在这一方法的上下文不显著。
version
-这是测试功能的版本号。
null
如果没有对象实现与功能相关的接口。如果此方法返回的
DOMObject
实现
DOMImplementation
接口,它必须代表最主要的核心
DOMImplementation
不返回结果与原核心
DOMImplementation
如
hasFeature
,
getFeature
一致,等。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.