xmlclass/xmlclass.py
changeset 1505 5ecb16be9a3c
parent 1405 0b9cd761a356
child 1563 584b6fdb949e
equal deleted inserted replaced
1504:d3f97b72c02a 1505:5ecb16be9a3c
  1688     
  1688     
  1689     def getLocalTag(self):
  1689     def getLocalTag(self):
  1690         return etree.QName(self.tag).localname
  1690         return etree.QName(self.tag).localname
  1691         
  1691         
  1692     def tostring(self):
  1692     def tostring(self):
  1693         return NAMESPACE_PATTERN.sub("", etree.tostring(self, pretty_print=True))
  1693         return NAMESPACE_PATTERN.sub("", etree.tostring(self, pretty_print=True, encoding='utf-8')).decode('utf-8')
  1694 
  1694 
  1695 class XMLElementClassLookUp(etree.PythonElementClassLookup):
  1695 class XMLElementClassLookUp(etree.PythonElementClassLookup):
  1696     
  1696     
  1697     def __init__(self, classes, *args, **kwargs):
  1697     def __init__(self, classes, *args, **kwargs):
  1698         etree.PythonElementClassLookup.__init__(self, *args, **kwargs)
  1698         etree.PythonElementClassLookup.__init__(self, *args, **kwargs)