Skip to content

Commit

Permalink
enable xml declaration in omewriter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
filippocastelli committed Sep 24, 2021
1 parent 99550fe commit 8805aa0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyometiff/omewriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ def write_xml(self, xml_fpath: Path = None):
if xml_fpath is None:
xml_fpath = self.fpath.parent.joinpath(self.fpath.stem + ".xml")
tree = ET.ElementTree(ET.fromstring(self._xml))
tree.write(str(xml_fpath), encoding="utf-8", method="xml", pretty_print=True)
tree.write(str(xml_fpath),
encoding="utf-8",
method="xml",
pretty_print=True,
xml_declaration=True)

@staticmethod
def _use_bigtiff(array):
Expand Down

0 comments on commit 8805aa0

Please sign in to comment.