We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8243c01 + 7b1b570 commit 13b0438Copy full SHA for 13b0438
src/modelspec/utils.py
@@ -148,14 +148,14 @@ def build_xml_element(parent, data):
148
if isinstance(data, dict):
149
for key, value in data.items():
150
if isinstance(value, dict):
151
- element = ET.SubElement(parent, key)
+ element = ET.SubElement(parent, key.replace(" ", "_"))
152
build_xml_element(element, value)
153
elif isinstance(value, list):
154
for item in value:
155
- subelement = ET.SubElement(parent, key)
+ subelement = ET.SubElement(parent, key.replace(" ", "_"))
156
build_xml_element(subelement, item)
157
else:
158
159
element.text = str(value)
160
161
parent.text = str(data)
0 commit comments