def _parseError(error, errorNamespace):
 condition = None
 text = None
 textLang = None
 appCondition = None
 for element in error.elements():
  if (element.uri == errorNamespace):
   if (element.name == 'text'):
    text = _getText(element)
    textLang = element.getAttribute((NS_XML, 'lang'))
   else:
    condition = element.name
  else:
   appCondition = element
 return {'condition': condition, 'text': text, 'textLang': textLang, 'appCondition': appCondition}

def _parseError ( error , errorNamespace ) : condition = None text = None textLang = None appCondition = None for element in error . elements ( ) : if ( element . uri == errorNamespace ) : if ( element . name == 'text' ) : text = _getText ( element ) textLang = element . getAttribute ( ( NS_XML , 'lang' ) ) else : condition = element . name else : appCondition = element return { 'condition' : condition , 'text' : text , 'textLang' : textLang , 'appCondition' : appCondition }
parses an error element .