Extract settings and write to settings.xml