def _do_document(self, node):
self.documentOrder = _LesserElement<EOL>for child in node.childNodes:<EOL><INDENT>if child.nodeType == Node.ELEMENT_NODE:<EOL><INDENT>self.documentOrder = _Element        <EOL>self._do_element(child)<EOL>self.documentOrder = _GreaterElement <EOL><DEDENT>elif child.nodeType == Node.PROCESSING_INSTRUCTION_NODE:<EOL><INDENT>self._do_pi(child)<EOL><DEDENT>elif child.nodeType == Node.COMMENT_NODE:<EOL><INDENT>self._do_comment(child)<EOL><DEDENT>elif child.nodeType == Node.DOCUMENT_TYPE_NODE:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>raise TypeError(str(child))<EOL><DEDENT><DEDENT>
_do_document(self, node) -> None
        Process a document node. documentOrder holds whether the document
        element has been encountered such that PIs/comments can be written
        as specified.