@classmethod
def parse_fromfile(cls, nmap_report_path, data_type='XML', incomplete=False):
    """
            Call generic cls.parse() method and ensure that a correct file             path is given as argument. If not, an exception is raised.

            :param nmap_data: Same as for parse().             Any portion of nmap scan reports could be passed as argument.             Data type _must be a valid path to a file containing             nmap scan results.

            :param data_type: Specifies the type of serialization in the file.

            :param incomplete: enable you to parse interrupted nmap scans             and/or incomplete nmap xml blocks by adding a </nmaprun> at             the end of the scan.
            :type incomplete: boolean

            :return: NmapObject
        """
    try:
        with open(nmap_report_path, 'r') as fileobj:
            fdata = fileobj.read()
            rval = cls.parse(fdata, data_type, incomplete)
    except IOError:
        raise
    return rval
