Lines Matching refs:path
360 def iterfind(elem, path, namespaces=None):
362 if path[-1:] == "/":
363 path = path + "*" # implicit all (FIXME: keep this?)
365 cache_key = (path,)
374 if path[:1] == "/":
375 raise SyntaxError("cannot use absolute path on element")
376 next = iter(xpath_tokenizer(path, namespaces)).__next__
386 raise SyntaxError("invalid path") from None
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))