xmlclass/xmlclass.py
changeset 1563 584b6fdb949e
parent 1505 5ecb16be9a3c
child 1571 486f94a8032c
equal deleted inserted replaced
1562:6e38f13d4b7b 1563:584b6fdb949e
  1752             error = self.XSDSchema.error_log.last_error
  1752             error = self.XSDSchema.error_log.last_error
  1753             return tree, (error.line, error.message)
  1753             return tree, (error.line, error.message)
  1754         return tree, None 
  1754         return tree, None 
  1755     
  1755     
  1756     def Dumps(self, xml_obj):
  1756     def Dumps(self, xml_obj):
  1757         return etree.tostring(xml_obj)
  1757         return etree.tostring(xml_obj, encoding='utf-8')
  1758     
  1758     
  1759     def Loads(self, xml_string):
  1759     def Loads(self, xml_string):
  1760         return etree.fromstring(xml_string, self)
  1760         return etree.fromstring(xml_string, self)
  1761     
  1761     
  1762     def CreateRoot(self):
  1762     def CreateRoot(self):