Improve XML export

This commit is contained in:
JonnyWong16
2020-10-01 21:13:07 -07:00
parent 8d18e98ca7
commit 627129dd95
2 changed files with 13 additions and 7 deletions

View File

@@ -1598,7 +1598,7 @@ class Export(object):
outfile.write(json_data)
elif self.file_format == 'xml':
xml_data = helpers.dict2xml(result, root_node=self.media_type)
xml_data = helpers.dict2xml({self.media_type: result}, root_node='export')
with open(filepath, 'w', encoding='utf-8') as outfile:
outfile.write(xml_data)