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))
评论列表
文章目录