lds.py 文件源码

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

项目:gprime 作者: GenealogyCollective 项目源码 文件源码
def __init__(self):
        """
        Parses the lds.xml file to load the LDS temple code to name
        maps
        """
        self.__temple_codes = {}
        self.__temple_to_abrev = {}
        self.__current_temple = ""
        self.__tlist = []

        lds_filename = os.path.expanduser(os.path.join(DATA_DIR, "lds.xml"))

        try:
            parser = ParserCreate()
            parser.StartElementHandler = self.__start_element
            parser.EndElementHandler = self.__end_element
            parser.CharacterDataHandler = self.__characters
            with open(lds_filename, 'rb') as xml_file:
                parser.ParseFile(xml_file)
        except Exception as msg:
            LOG.error(str(msg))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号