def METHOD_NAME(self, element):
    info = {}
    if self._format == 'xml':
        info['host'] = element.find('host').text
        info['ip'] = element.find('ip_address').text
    elif self._format == 'json':
        info['host'] = element['host']
        info['ip'] = element['ip_address']
    return info