From 86311ec031c1a36ea7041bc8390323a77469803f Mon Sep 17 00:00:00 2001 From: Jan Rodak Date: Thu, 15 Feb 2024 13:39:47 +0100 Subject: [PATCH] Add XML declaration --- build-scripts/compose_ds.py | 4 ++-- ssg/build_yaml.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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):