--- title: XMLDocument slug: Web/API/XMLDocument tags: - API - DOM - XML - 参考 - 接口 translation_of: Web/API/XMLDocument ---

{{APIRef("DOM")}}

The XMLDocument interface represents an XML document. It inherits from the generic {{DOMxRef("Document")}} and does not add any specific methods or properties to it: nevertheless, several algorithms behave differently with the two types of documents.

{{InheritanceDiagram}}

属性

Also inherits properties from: {{DOMxRef("Document")}}

{{DOMxRef("XMLDocument.async")}} {{Non-standard_Inline}} {{Deprecated_Inline}}
Used with {{DOMxRef("XMLDocument.load()")}} to indicate an asynchronous request.

方法

Also inherits methods from: {{DOMxRef("Document")}}

{{DOMxRef("XMLDocument.load()")}} {{Non-standard_Inline}} {{Deprecated_Inline}}
Loads an XML document.

规范

规范 状态 备注
{{SpecName("DOM WHATWG", "#xmldocument", "XMLDocument")}} {{Spec2("DOM WHATWG")}} 没有变化。
{{SpecName("DOM4", "#xmldocument", "XMLDocument")}} {{Spec2("DOM4")}} 初步定义。

浏览器兼容性

{{Compat("api.XMLDocument")}}

另请参见