diff --git a/sparv/modules/xml_export/pretty.py b/sparv/modules/xml_export/pretty.py index 0d8d9249..bb512500 100644 --- a/sparv/modules/xml_export/pretty.py +++ b/sparv/modules/xml_export/pretty.py @@ -118,7 +118,7 @@ def pretty(source_file: SourceFilename = SourceFilename(), # Write XML to file with open(out, mode="w", encoding="utf-8") as outfile: - outfile.write(xmlstr) + print(xmlstr, file=outfile) # Use print() to get a newline at the end of the file logger.info("Exported: %s", out) diff --git a/sparv/modules/xml_export/scrambled.py b/sparv/modules/xml_export/scrambled.py index 0db42fab..0e584aec 100644 --- a/sparv/modules/xml_export/scrambled.py +++ b/sparv/modules/xml_export/scrambled.py @@ -91,7 +91,7 @@ def scrambled(source_file: SourceFilename = SourceFilename(), # Write XML to file with open(out, mode="w", encoding="utf-8") as outfile: - outfile.write(xmlstr) + print(xmlstr, file=outfile) # Use print() to get a newline at the end of the file logger.info("Exported: %s", out)