当前位置: 首页>>代码示例>>Python>>正文


Python XML.buryValue方法代码示例

本文整理汇总了Python中cia.LibCIA.XML.buryValue方法的典型用法代码示例。如果您正苦于以下问题:Python XML.buryValue方法的具体用法?Python XML.buryValue怎么用?Python XML.buryValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cia.LibCIA.XML的用法示例。


在下文中一共展示了XML.buryValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: command_Announce

# 需要导入模块: from cia.LibCIA import XML [as 别名]
# 或者: from cia.LibCIA.XML import buryValue [as 别名]
    def command_Announce(self, project):
        """Old-style announcements: Announce <project> in the subject line.
           The body of the email contained the message's text, marked up
           with {color} tags but with no metadata.
           """
        xml = XML.createRootNode()

        # Convert the given project name to a <project> tag inside <source>,
        # after filtering it a bit... in the old CIA project names and IRC channel
        # names weren't particularly distinct, so preceeding "#" characters on
        # projects were ignored. We preserve this behaviour.
        if project[0] == "#":
            project = project[1:]
        XML.buryValue(xml, project, "message", "source", "project")

        # Since old-style commits didn't have any metadata, the best we can do
        # is to represent the log in a <colorText> element
        colorText = ColorTextParser().parse(self.message.get_payload()).documentElement
        XML.bury(xml, "message", "body").appendChild(xml.importNode(colorText, True))
        return xml
开发者ID:Justasic,项目名称:cia-vc,代码行数:22,代码来源:IncomingMail.py


注:本文中的cia.LibCIA.XML.buryValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。