code: def loadFromStream(self, file, url=None):
          
          reader = self.__readerClass()
          reader.loadDocument(file)
          schema = XMLSchema()
          if url is not None:
               schema.setBaseUrl(url)
          schema.load(reader)
          self.__setIncludes(schema)
          self.__setImports(schema)
          return schema
docs: Return an XMLSchema instance loaded from a file object.
             file -- file object
             url -- base location for resolving imports/includes.