Lines Matching full:namespaces
14 # 2007-11-30 fl added namespaces support
73 def xpath_tokenizer(pattern, namespaces=None):
79 if not namespaces:
81 yield token[0], "{%s}%s" % (namespaces[prefix], uri)
256 def iterfind(elem, path, namespaces=None):
258 cache_key = (path, None if namespaces is None
259 else tuple(sorted(namespaces.items())))
269 next = iter(xpath_tokenizer(path, namespaces)).__next__
297 def find(elem, path, namespaces=None):
298 return next(iterfind(elem, path, namespaces), None)
303 def findall(elem, path, namespaces=None):
304 return list(iterfind(elem, path, namespaces))
309 def findtext(elem, path, default=None, namespaces=None):
311 elem = next(iterfind(elem, path, namespaces))