def nmap_service_loopy(host, args, addr, data_nmap_services):
    """
    Specific Nmap loop to print all identified services, if stored in the XML
    """
    for port in host.findall('ports/port'):
        portid = port.get('portid')
        for root_state in port.findall('state'):
            if root_state.get('state') == args.nmap_state:
                for service in port.findall('service'):
                    proto = port.get('protocol')
                    service_name = service.get('name')
                    state = root_state.get('state')
                    data_nmap_services.append([addr, portid, proto,
                        service_name, state])
