From 5cd16cb22dc0ae9c3590eefad4fe74650cd9a8e4 Mon Sep 17 00:00:00 2001 From: Peter Staar Date: Mon, 9 Sep 2024 14:56:07 +0200 Subject: [PATCH] updating the to-xml method Signed-off-by: Peter Staar --- docling_core/types/doc/document.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docling_core/types/doc/document.py b/docling_core/types/doc/document.py index ea91321..c514774 100644 --- a/docling_core/types/doc/document.py +++ b/docling_core/types/doc/document.py @@ -634,7 +634,7 @@ def export_to_xml( Returns: str: The content of the document formatted as an XML string. """ - xml_str = "" + xml_str = DocumentToken.BEG_DOCUMENT.value new_line = "" if add_new_line: @@ -710,6 +710,6 @@ def export_to_xml( xml_str += f"{new_line}" - xml_str += "" + xml_str += DocumentToken.END_DOCUMENT.value return xml_str