if error_xml:
                if error_xml[0].hasAttribute('type'):
                    type = error_xml[0].getAttribute('type')
                else:
                    type = ''