xmlclass/xmlclass.py
changeset 1505 5ecb16be9a3c
parent 1405 0b9cd761a356
child 1563 584b6fdb949e
--- a/xmlclass/xmlclass.py	Mon Apr 25 17:23:04 2016 +0300
+++ b/xmlclass/xmlclass.py	Wed Apr 27 18:42:30 2016 +0300
@@ -1690,7 +1690,7 @@
         return etree.QName(self.tag).localname
         
     def tostring(self):
-        return NAMESPACE_PATTERN.sub("", etree.tostring(self, pretty_print=True))
+        return NAMESPACE_PATTERN.sub("", etree.tostring(self, pretty_print=True, encoding='utf-8')).decode('utf-8')
 
 class XMLElementClassLookUp(etree.PythonElementClassLookup):