这是一个实验中的功能
此功能某些浏览器尚在开发中,请参考浏览器兼容性表格以得到在不同浏览器中适合使用的前缀。由于该功能对应的标准文档可能被重新修订,所以在未来版本的浏览器中该功能的语法和行为可能随之改变。

W3C并没有定义XMLDocument接口。原因是document接口本来就是为xml定义的。而HTML只是xml的一种实现。因此需要定义HTMLDocument。但是在FireFox有一个专门的XMLDocument构造器。应该是对document对象的一些扩展。通常情况下,就当作document来使用。

属性

此接口没有特定的属性,也不继承任何属性

方法

此接口没有添加任何新的方法

XMLDocument.load()
加载XML文档

规范

规范 状态 评论
HTML Living Standard
Extension to XMLDocument
Living Standard  HTML5没有变化
HTML5
Extension to XMLDocument
Recommendation

 

添加load() 方法。

DOM
XMLDocument
Living Standard 初步定义。

浏览器支持

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome No support NoEdge Full support YesFirefox Full support 1IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile Full support YesFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
load
DeprecatedNon-standard
Chrome No support NoEdge No support NoFirefox Full support 3
Notes
Full support 3
Notes
Notes See bug 332175 for removal.
No support 1 — 3
Notes
Notes Before version 3, Firefox supported cross‑origin loads, even in cases where this would violate CORS.
IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android Full support 4
Notes
Full support 4
Notes
Notes See bug 332175 for removal.
Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.
See implementation notes.
See implementation notes.

另请参见

文档标签和贡献者

此页面的贡献者: mySoul, teoli, ziyunfei, Xiaomin98
最后编辑者: mySoul,