Node.parent

auto parent(Show show = Show.Element)()

The parent, if it matches show (else an invalid node). By default the parent element: the parent of <html> is the document, so html.parent is invalid and html.parent!(Show.All) is the document.