Hi all.
This follows my previous questions on using lxml and Python.
I have a question, as to when I have a choice between using the methods provided by the lxml.etree and where I can make use of XPath, what should I use?
For example, to get a list of all the X tags in a XML document, I could either iterate through it using the getiterator()
of lxml.etree, or I could write the XPath expression: //x
.
There may be many more examples, this is just one. Question is, which should when I have a choose and why?