Ejemplo n.º 1
0
 def __xml(self,
           path,
           cache=CacheDict(),
           read=minidom.parse,
           joinPath=os.path.join):
     try:
         doc = cache[path]
     except KeyError:
         cache[path] = doc = read(joinPath(self.root,
                                           *path)).documentElement
     return doc
Ejemplo n.º 2
0
 def __localeRoots(self, name, cache = CacheDict()):
     try:
         chain = cache[name]
     except KeyError:
         cache[name] = chain = self.__Seq(self.__scanLocaleRoots(name))
     return chain
Ejemplo n.º 3
0
 def __xml(self, relative_path: str, cache = CacheDict(), read = minidom.parse):
     try:
         doc = cache[relative_path]
     except KeyError:
         cache[relative_path] = doc = read(str(self.root.joinpath(relative_path))).documentElement
     return doc