From 90f03c9baaebf19a2472306492c819e137be1b19 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 17 Apr 2025 11:26:45 +0200 Subject: [PATCH] Add missing XML declaration --- drafthorse/models/document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drafthorse/models/document.py b/drafthorse/models/document.py index b654f92..4b16f31 100644 --- a/drafthorse/models/document.py +++ b/drafthorse/models/document.py @@ -123,7 +123,7 @@ class Document(Element): for ns, url in self.__namespaces.items(): if f"xmlns:{ns}".encode() not in xml: root.set(f"xmlns:{ns}", url) - return ET.tostring(root, "utf-8") + return ET.tostring(root, "utf-8", xml_declaration=True) class Meta: namespace = NS_RSM -- 2.47.3