Skip to content

Commit

Permalink
updating the to-xml method
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Staar <[email protected]>
  • Loading branch information
PeterStaar-IBM committed Sep 9, 2024
1 parent 4ca481e commit 5cd16cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docling_core/types/doc/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def export_to_xml(
Returns:
str: The content of the document formatted as an XML string.
"""
xml_str = "<document>"
xml_str = DocumentToken.BEG_DOCUMENT.value

new_line = ""
if add_new_line:
Expand Down Expand Up @@ -710,6 +710,6 @@ def export_to_xml(

xml_str += f"</{item_type}>{new_line}"

xml_str += "</document>"
xml_str += DocumentToken.END_DOCUMENT.value

return xml_str

0 comments on commit 5cd16cb

Please sign in to comment.