def tree(self) -> _Element:
        """Return DOM tree of the document built with HTML DOM builder."""
        if self.document_type == "xml":
            return self.build_xml_tree()
        return self.build_html_tree()
Return DOM tree of the document built with HTML DOM builder.
grab/document.py