def _loadDoc(self):
        """
        Read and parse the XML.

        @return: the loaded document.
        @rtype: a C{list} of Stan objects.
        """
        if not isinstance(self._path, FilePath):
            return _flatsaxParse(self._path)
        else:
            with self._path.open('r') as f:
                return _flatsaxParse(f)

        Read and parse the XML.

        @return: the loaded document.
        @rtype: a C{list} of Stan objects.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/template.py