def _getAdmlDisplayName(adml_xml_data, display_name):
 if (display_name.startswith('$(') and display_name.endswith(')')):
  display_name = re.sub('(^\\$\\(|\\)$)', '', display_name)
  display_name = display_name.split('.')
  displayname_type = display_name[0]
  displayname_id = display_name[1]
  search_results = ADML_DISPLAY_NAME_XPATH(adml_xml_data, displayNameType=displayname_type, displayNameId=displayname_id)
  if search_results:
   for result in search_results:
    return result.text
 return None

def _getAdmlDisplayName ( adml_xml_data , display_name ) : if ( display_name . startswith ( '$(' ) and display_name . endswith ( ')' ) ) : display_name = re . sub ( '(^\\$\\(|\\)$)' , '' , display_name ) display_name = display_name . split ( '.' ) displayname_type = display_name [ 0 ] displayname_id = display_name [ 1 ] search_results = ADML_DISPLAY_NAME_XPATH ( adml_xml_data , displayNameType = displayname_type , displayNameId = displayname_id ) if search_results : for result in search_results : return result . text return None
helper function to take the displayname attribute of an element and find the value from the adml data adml_xml_data :: xml data of all adml files to search display_name :: the value of the displayname attribute from the admx entry to search the adml data for .