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.