On Fri, 2006-05-26 at 04:56 -0300, Steve Howe wrote:
Hello Andrey,
Friday, May 26, 2006, 4:50:42 AM, you wrote:
That's a great chance to start findall vs xpath battle again =)
I think lxml should eliminate .xpath method and implement .find* methods through libxml2 xpath support. I really do not want to start any battles. There must be a good reason for the differences, and I just would like to know what they are and I think they should be documented...
Anyway even if for any reasons it decides to get rid of the xpath() method, it should remain as alias for findall() to keep compatibility with older code.
Ok, at the moment .find* methods are served by the same code as in ElementTree, so .find* methods behave exactly like ElementTree's one. .xpath method is lxml's own implementation, somewhere inconsistent with ElementTree's .find. AFAIR: - there is other namespace declaration convention, - full XPath support, - and different behavior on absolute paths (I think that's the place where ElementTree is broken).