diff options
Diffstat (limited to 'gsxws')
-rw-r--r-- | gsxws/core.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gsxws/core.py b/gsxws/core.py index ffdc25d..5cd0261 100644 --- a/gsxws/core.py +++ b/gsxws/core.py @@ -331,14 +331,16 @@ class GsxObject(object): if isinstance(v, basestring): el.text = v if isinstance(v, dict): - v = GsxObject(**v) + for a, b in v.items(): + i = ET.SubElement(el, a) + i.text = b if isinstance(v, GsxObject): el.append(v.to_xml(k)) if isinstance(v, list): for e in v: if isinstance(e, GsxObject): el.append(e.to_xml(k)) - else: # assuming it's a dict... @TODO: make this nicer + else: # Assuming dict. @TODO: yuck... for a, b in e.items(): i = ET.SubElement(el, a) i.text = b |