xmlclass/xmlclass.py
changeset 119 564564136c79
parent 116 58b9b84e385f
child 125 394d9f168258
--- a/xmlclass/xmlclass.py	Tue Oct 30 16:53:08 2007 +0100
+++ b/xmlclass/xmlclass.py	Mon Nov 05 09:41:12 2007 +0100
@@ -679,11 +679,7 @@
                         attr_type = members["choice_content"][name]
                         # Extracts the value
                         if attr_type.startswith("bse:"):
-                            attr_value = GetAttributeValue(node)
-                            if write_type != "optional" or attr_value != "":
-                                val = GetComputedValue(attr_type.replace("[]",""), attr_value)
-                            else:
-                                val = None
+                            val = GetComputedValue(attr_type.replace("[]",""), GetAttributeValue(node))
                         elif attr_type.startswith("cls:"):
                             val = classes[attr_type[4:].replace("[]","")]()
                             val.loadXMLTree(node)
@@ -702,11 +698,7 @@
                         attr_type = members["multichoice_content"][name]
                         # Extracts the value
                         if attr_type.startswith("bse:"):
-                            attr_value = GetAttributeValue(node)
-                            if write_type != "optional" or attr_value != "":
-                                val = GetComputedValue(attr_type, attr_value)
-                            else:
-                                val = None
+                            val = GetComputedValue(attr_type, GetAttributeValue(node))
                         elif attr_type.startswith("cls:"):
                             val = classes[attr_type[4:]]()
                             val.loadXMLTree(node)