Hello,

While still learning about lxml and xpath, I'm not clear as to why there are 
different ways to find elements in a tree:

=============
name = root.xpath('//name')
print("xpath/name is ",name[0].text)

name=root.findall('.//name')
print("findall/name is ",name[0].text)

for name in root.iter('name'):
        print("iter/name is ",name.text)
=============

Why all those different ways?

Thank you.
_______________________________________________
lxml - The Python XML Toolkit mailing list -- lxml@python.org
To unsubscribe send an email to lxml-le...@python.org
https://mail.python.org/mailman3/lists/lxml.python.org/
Member address: arch...@mail-archive.com

Reply via email to