aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws
diff options
context:
space:
mode:
Diffstat (limited to 'gsxws')
-rw-r--r--gsxws/core.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/gsxws/core.py b/gsxws/core.py
index 52d09c3..69149d2 100644
--- a/gsxws/core.py
+++ b/gsxws/core.py
@@ -335,10 +335,12 @@ class GsxObject(object):
el.append(v.to_xml(k))
if isinstance(v, list):
for e in v:
- if isinstance(v, GsxObject):
+ if isinstance(e, GsxObject):
el.append(e.to_xml(k))
- else: # assuming it's a dict...
- el.append(GsxObject(**e).to_xml(k))
+ else: # assuming it's a dict... @TODO: make this nicer
+ for a, b in e.items():
+ i = ET.SubElement(el, a)
+ i.text = b
return root