'This method parses an XML scan result, displays a JSON
version of the result, and return True if everything went
fine, False otherwise.
In backend-specific subclasses, this method stores the result
instead of displaying it, thanks to the `content_handler`
attribute.'

def store_scan_xml(self, fname, **kargs):

    parser = xml.sax.make_parser()
    self.start_store_hosts()
    try:
        content_handler = self.content_handler(fname, **kargs)
    except Exception:
        utils.LOGGER.warning('Exception    (file    %r)', fname, exc_info=True)
    else:
        parser.setContentHandler(content_handler)
        parser.setEntityResolver(xmlnmap.NoExtResolver())
        parser.parse(utils.open_file(fname))
        if (self.output_function is not None):
            self.output_function(content_handler._db, out=self.output)
        self.stop_store_hosts()
        return True
    self.stop_store_hosts()
    return False
