@@ -0,0 +1,1037 @@
+# -*- coding: utf-8 -*-%0A%0A''' xml_to_json_france.py : Parse XML parameter files for Openfisca-France and convert them to YAML files%0A%0AUsage :%0A  %60python xml_to_json_france.py output_dir%60%0Aor just (output is written in a directory called %60yaml_parameters%60):%0A  %60python xml_to_json_france.py%60%0A'''%0A%0Aimport sys%0Aimport os%0A%0Afrom openfisca_france.france_taxbenefitsystem import COUNTRY_DIR%0Afrom openfisca_core.scripts.xml_to_json import xml_to_json%0A%0A%0Aif len(sys.argv) %3E 1:%0A    target_path = sys.argv%5B1%5D%0Aelse:%0A    target_path = 'yaml_parameters'%0A%0Aparam_dir = os.path.join(COUNTRY_DIR, 'parameters')%0Aparam_files = %5B%0A    '__root__.xml',%0A    'bouclier_fiscal.xml',%0A    'bourses_education.xml',%0A    'cmu.xml',%0A    'cotsoc.xml',%0A    'fonc.xml',%0A    'impot_revenu.xml',%0A    'prelevements_sociaux.xml',%0A    'prestations.xml',%0A    'taxation_capital.xml',%0A    'tns.xml'%0A    %5D%0Alegislation_xml_info_list = %5B%0A    (os.path.join(param_dir, param_file), %5B%5D)%0A    for param_file in param_files%0A%5D%0A%0Axml_to_json.write_legislation(legislation_xml_info_list, target_path)%0A

Transforme les params XML en YAML