The Mozilla MDN documentation for XMLDocument
includes the following note — emphasis mine:
The
XMLDocument
interface represents an XML document. It inherits from the genericDocument
and does not add any specific methods or properties to it: nevertheless, several algorithms behave differently with the two types of documents.
The linked spec says something similar:
A document is said to be an XML document if its type is "xml"; otherwise an HTML document. Whether a document is an HTML document or an XML document affects the behavior of certain APIs.
I can find no information on what behaves differently, though. Is this enumerated anywhere?
If you click on the definition of HTML document you'll find where it's referenced. From that you can find out that createElement()
branches on it, for instance.
Through https://dontcallmedom.github.io/webdex/h.html#HTML%20document%40%40dom%25%25dfn you can find other specifications that reference that definition.
Though you would also have to check https://dontcallmedom.github.io/webdex/x.html#XML%20document%40%40dom%25%25dfn and https://dontcallmedom.github.io/webdex/t.html#type%40%40Document%40dfn to be comprehensive.
(There are also syntax and conformance differences between HTML and XML as some of the initial comments above suggest, but those don't really follow from this concept, which only comes into play once you have a node tree.)