diff options
Diffstat (limited to 'gsxws/xmltodict.py')
-rw-r--r-- | gsxws/xmltodict.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gsxws/xmltodict.py b/gsxws/xmltodict.py index c577e55..b8973ae 100644 --- a/gsxws/xmltodict.py +++ b/gsxws/xmltodict.py @@ -33,6 +33,10 @@ class XmlDictObject(dict): if re.search(r'^[YN]$', v): v = (v == "Y") + # convert true/false to boolean + if re.search(r'^(true)|(false)$', v): + v = (v == "true") + # strip currency prefix and munge into float if re.search(r'Price$', item): v = float(re.sub(r'[A-Z ,]', '', v)) |