diff --git a/build-scripts/compose_ds.py b/build-scripts/compose_ds.py index b5808a61b66c..decdc19364f5 100755 --- a/build-scripts/compose_ds.py +++ b/build-scripts/compose_ds.py @@ -282,10 +282,10 @@ def upgrade_ds_to_scap_13(ds): def _store_ds(ds, output_13, output_12): if output_12: - ds.write(output_12) + ds.write(output_12, xml_declaration=True) ds_13 = upgrade_ds_to_scap_13(ds) - ds_13.write(output_13) + ds_13.write(output_13, xml_declaration=True) def append_id_to_file_name(path, id_): diff --git a/ssg/build_yaml.py b/ssg/build_yaml.py index 6471a4d4a251..a8aa55858951 100644 --- a/ssg/build_yaml.py +++ b/ssg/build_yaml.py @@ -1587,7 +1587,7 @@ def export_ocil_to_file(self, filename): if root is None: return tree = ET.ElementTree(root) - tree.write(filename) + tree.write(filename, xml_declaration=True) class Platform(XCCDFEntity):