from __future__ import annotations
from typing import Any, Protocol, runtime_checkable

@runtime_checkable
class XDocument(XNode, Protocol):
    def createComment(self, data: str) -> XComment: ...
    def createDocumentFragment(self) -> XDocumentFragment: ...
    def createTextNode(self, data: str) -> XText: ...
    def getDoctype(self) -> XDocumentType: ...
    def getDocumentElement(self) -> XElement: ...
    def getElementById(self, elementId: str) -> XElement: ...
    def getElementsByTagName(self, tagname: str) -> XNodeList: ...
    def getElementsByTagNameNS(self, namespaceURI: str, localName: str) -> XNodeList: ...
    def getImplementation(self) -> XDOMImplementation: ...
