18 Mar
2018
18 Mar
'18
12:46 a.m.
Am 17. März 2018 23:16:34 MEZ schrieb Peng Yu:
I am not sure what is the difference between findall() and xpath(). Could anybody show all the examples in which they are different?
Does this help? http://lxml.de/tutorial.html#elementpath
Also, I see that findall() can be faster. Is it case that when I can use both, I should use findall() instead of xpath()?
IMHO yes. Or rather, iterate instead of requesting a complete result list whenever you can. Stefan