ScheduleNode.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:py-enarksh-lib 作者: SetBased 项目源码 文件源码
def get_xml(self, encoding='utf-8'):
        """
        Returns the XML-code of this schedule.

        The returned byte string contains the XML in the requested encoding. You save the byte sting to file in binary
        mode (the file will encoded the requested encoding). Or you can convert the byte string to a string with
        .decode(encoding).

        :param str encoding: The encoding of the XML.

        :rtype: bytes
        """
        tree = Element(None)
        self.generate_xml(tree)

        xml_string = ElementTree.tostring(tree)
        document = minidom.parseString(xml_string)

        return document.toprettyxml(indent=' ', encoding=encoding)

    # ------------------------------------------------------------------------------------------------------------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号