Document is the top-level element in the Document Object Model. It contains nested Element, Text and Comment nodes.
(self, html, **kwargs)
| 2797 | class Document(Element): |
| 2798 | |
| 2799 | def __init__(self, html, **kwargs): |
| 2800 | """ Document is the top-level element in the Document Object Model. |
| 2801 | It contains nested Element, Text and Comment nodes. |
| 2802 | """ |
| 2803 | # Aliases for BeautifulSoup optional parameters: |
| 2804 | kwargs["selfClosingTags"] = kwargs.pop("self_closing", kwargs.get("selfClosingTags")) |
| 2805 | Node.__init__(self, u(html).strip(), type=DOCUMENT, **kwargs) |
| 2806 | |
| 2807 | @property |
| 2808 | def declaration(self): |