parameters: (jsdata, **options)
docstring: change package-named item reference in preference UI xml
docstring_summary: change package-named item reference in preference UI xml
docstring_tokens: change package - named item reference in preference UI xml
function: def step_update_xml_nodes(jsdata, **options):
      """ change package-named item reference in preference UI xml """
  
      move_to_android_placeholder()
  
      # rename settings.SliderPreference node in res/xml/preferences.xml
      preferences_xml = os.path.join(ANDROID_PATH, 'res', 'xml',
                                     'preferences.xml')
      try:
          soup = BeautifulSoup(open(preferences_xml, 'r'),
                               'xml', from_encoding='utf-8')
          item = soup.find('org.kiwix.kiwixmobile.views.SliderPreference')
          item.name = '{}.views.SliderPreference'.format(jsdata.get('package'))
          flushxml(soup, 'PreferenceScreen', preferences_xml, head=False)
  
          # rename settings.CustomSwitchPreference node in res/xml/preferences.xml
          preferences_xml = os.path.join(ANDROID_PATH, 'res', 'xml',
                                         'preferences.xml')
          soup = BeautifulSoup(open(preferences_xml, 'r'),
                               'xml', from_encoding='utf-8')
          for item in soup.findAll('org.kiwix.kiwixmobile.settings.CustomSwitchPreference'):
              item.name = '{}.settings.CustomSwitchPreference'.format(jsdata.get('package'))
          flushxml(soup, 'PreferenceScreen', preferences_xml, head=False)
  
  	main_xml = os.path.join(ANDROID_PATH, 'res', 'layout', 'main.xml')
      	soup = soup = BeautifulSoup(open(main_xml, 'r'),
                                  'xml', from_encoding='utf-8')
      	item = soup.find('org.kiwix.kiwixmobile.views.AnimatedProgressBar')
      	item.name = '{}.views.AnimatedProgressBar'.format(jsdata.get('package'))
      	flushxml(soup, 'android.support.design.widget.CoordinatorLayout', main_xml, head=False)
      except:
      	logger.error('BeautifulSoup could not open file in res/xml')
function_tokens: def step_update_xml_nodes ( jsdata , * * options ) : move_to_android_placeholder ( ) # rename settings.SliderPreference node in res/xml/preferences.xml preferences_xml = os . path . join ( ANDROID_PATH , 'res' , 'xml' , 'preferences.xml' ) try : soup = BeautifulSoup ( open ( preferences_xml , 'r' ) , 'xml' , from_encoding = 'utf-8' ) item = soup . find ( 'org.kiwix.kiwixmobile.views.SliderPreference' ) item . name = '{}.views.SliderPreference' . format ( jsdata . get ( 'package' ) ) flushxml ( soup , 'PreferenceScreen' , preferences_xml , head = False ) # rename settings.CustomSwitchPreference node in res/xml/preferences.xml preferences_xml = os . path . join ( ANDROID_PATH , 'res' , 'xml' , 'preferences.xml' ) soup = BeautifulSoup ( open ( preferences_xml , 'r' ) , 'xml' , from_encoding = 'utf-8' ) for item in soup . findAll ( 'org.kiwix.kiwixmobile.settings.CustomSwitchPreference' ) : item . name = '{}.settings.CustomSwitchPreference' . format ( jsdata . get ( 'package' ) ) flushxml ( soup , 'PreferenceScreen' , preferences_xml , head = False ) main_xml = os . path . join ( ANDROID_PATH , 'res' , 'layout' , 'main.xml' ) soup = soup = BeautifulSoup ( open ( main_xml , 'r' ) , 'xml' , from_encoding = 'utf-8' ) item = soup . find ( 'org.kiwix.kiwixmobile.views.AnimatedProgressBar' ) item . name = '{}.views.AnimatedProgressBar' . format ( jsdata . get ( 'package' ) ) flushxml ( soup , 'android.support.design.widget.CoordinatorLayout' , main_xml , head = False ) except : logger . error ( 'BeautifulSoup could not open file in res/xml' )