code: def parseFile(self, filename):
          '''
              parseFile - Parses a file and creates the DOM tree and indexes
      
                  @param filename <str/file> - A string to a filename or a file object. If file object, it will not be closed, you must close.
          '''
          self.reset()
  
          if isinstance(filename, file):
              contents = filename.read()
          else:
              with codecs.open(filename, 'r', encoding=self.encoding) as f:
                  contents = f.read()
  
          self.feed(contentsf parseFile(self, filename):
          '''
              parseFile - Parses a file and creates the DOM tree and indexes
      
                  @param filename <str/file> - A string to a filename or a file object. If file object, it will not be closed, you must close.
          '''
          self.reset()
  
          if isinstance(filename, file):
              contents = filename.read()
          else:
              with codecs.open(filename, 'r', encoding=self.encoding) as f:
                  contents = f.read()
  
          self.feed(contents)
docs: parseFile - Parses a file and creates the DOM tree and indexes
      
                  @param filename <str/file> - A string to a filename or a file object. If file object, it will not be closed, you must close.