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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/lxml.python.org/
Member address: [email protected]