示例#1
0
    def tostring(self):
        """ Get the XML representation as unicode `string`.

        :return: unicode XML string of this object and all its subelements

        """
        xml = self.get_xml()
        xml_utf8_str = etree.tostring(xml, encoding='utf-8')
        return xml_utf8_str.decode('utf-8')
示例#2
0
文件: base.py 项目: dyao-vu/meta-core
    def tostring(self):
        """ Get the XML representation as unicode `string`.

        :return: unicode XML string of this object and all its subelements

        """
        xml = self.get_xml()
        xml_utf8_str = etree.tostring(xml, encoding='utf-8')
        return xml_utf8_str.decode('utf-8')