(filename)
return scan_data
Given an XML filename, reads and parses the XML file and passes the 
    the root node of type xml.etree.ElementTree.Element to the get_host_data
    function, which will futher parse the data and return a list of lists
    containing the scan data for a host or hosts.
Given an XML filename, reads and parses the XML file and passes the 
    the root node of type xml.etree.ElementTree.Element to the get_host_data
    function, which will futher parse the data and return a list of lists
    containing the scan data for a host or hosts.
Given an XML filename reads and parses the XML file and passes the the root node of type xml . etree . ElementTree . Element to the get_host_data function which will futher parse the data and return a list of lists containing the scan data for a host or hosts .
def parse_xml(filename):
    """Given an XML filename, reads and parses the XML file and passes the 
    the root node of type xml.etree.ElementTree.Element to the get_host_data
    function, which will futher parse the data and return a list of lists
    containing the scan data for a host or hosts."""
    try:
        tree = etree.parse(filename)
    except Exception as error:
        print("[-] A an error occurred. The XML may not be well formed. "
              "Please review the error and try again: {}".format(error))
        exit()
    root = tree.getroot()
    scan_data = get_host_data(root)
    return scan_data
def parse_xml ( filename ) : try : tree = etree . parse ( filename ) except Exception as error : print ( "[-] A an error occurred. The XML may not be well formed. " "Please review the error and try again: {}" . format ( error ) ) exit ( ) root = tree . getroot ( ) scan_data = get_host_data ( root ) return scan_data