Lines Matching refs:namespaces
14 # 2007-11-30 fl added namespaces support
74 def xpath_tokenizer(pattern, namespaces=None):
75 default_namespace = namespaces.get('') if namespaces else None
83 if not namespaces:
85 yield ttype, "{%s}%s" % (namespaces[prefix], uri)
360 def iterfind(elem, path, namespaces=None):
366 if namespaces:
367 cache_key += tuple(sorted(namespaces.items()))
376 next = iter(xpath_tokenizer(path, namespaces)).__next__
404 def find(elem, path, namespaces=None):
405 return next(iterfind(elem, path, namespaces), None)
410 def findall(elem, path, namespaces=None):
411 return list(iterfind(elem, path, namespaces))
416 def findtext(elem, path, default=None, namespaces=None):
418 elem = next(iterfind(elem, path, namespaces))