Author: remi
Date: 2009-06-26 11:57:00 +0200 (Fri, 26 Jun 2009)
New Revision: 4906

Modified:
   software_suite_v3/smart-core/smart-server/trunk/util/xml/XmlSerializer.py
Log:
* fixed encoding of xml attributes.

Modified: 
software_suite_v3/smart-core/smart-server/trunk/util/xml/XmlSerializer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/xml/XmlSerializer.py   
2009-06-26 08:52:47 UTC (rev 4905)
+++ software_suite_v3/smart-core/smart-server/trunk/util/xml/XmlSerializer.py   
2009-06-26 09:57:00 UTC (rev 4906)
@@ -54,14 +54,22 @@
         @param nodeName: Xml node name.
         @param nodeAttributes: Xml node attributes.
         """
+        nodeAttributes = dict(nodeAttributes)
+        for key in nodeAttributes.keys():
+            try:
+                node = nodeAttributes[key]
+                node = node.encode(self.__encoding)
+                nodeAttributes[key] = node
+            except:
+                pass
         if self.__nodesCounter == 0:
             self.__parentNodeName = nodeName
-            self.__dictionary[nodeName] = [dict(nodeAttributes), '', []]
+            self.__dictionary[nodeName] = [nodeAttributes, '', []]
             self.__currentNodeDict = self.__dictionary
         else:
             self.__parentNodeName = self.__nodeNameStack[-1]
             self.__parentNodeDict = self.__nodeDictsStack[-1]
-            childNode = {nodeName: [dict(nodeAttributes), '', []]}
+            childNode = {nodeName: [nodeAttributes, '', []]}
             childNodesList = (self.__parentNodeDict[self.__parentNodeName])[2]
             childNodesList.append(childNode)
             self.__currentNodeDict = childNode


------------------------------------------------------------------------------
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to