From: Raphael Michel Date: Thu, 17 Apr 2025 09:26:45 +0000 (+0200) Subject: Add missing XML declaration X-Git-Tag: 2025.1.1~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=90f03c9baaebf19a2472306492c819e137be1b19;p=thirdparty%2Fpython-drafthorse.git Add missing XML declaration --- 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