@staticmethod
def _parse_field_error(xml):
    """Iterate over field errors and parse into dicts"""
    errors = {}
    for error in xml.iter('field-error'):
        attribs = error.attrib
        errors[attribs['name']] = {'code': attribs['name'], 'error':
            attribs['error']}
    return errors
