This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: xml.etree.ElementTree.Element: docs should mention immediate subelement
Type: Stage:
Components: Documentation Versions:
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: docs@python Nosy List: christian.heimes, docs@python, techtonik
Priority: normal Keywords:

Created on 2011-03-02 01:30 by techtonik, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg129845 - (view) Author: anatoly techtonik (techtonik) Date: 2011-03-02 01:30
From xml.etree.ElementTree.Element docs it is not obvious that find() and fundall() functions all return immediate children of current element.
msg129846 - (view) Author: anatoly techtonik (techtonik) Date: 2011-03-02 01:34
See also http://diveintopython3.org/xml.html#xml-find
msg192373 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-05 23:12
The introduction [1] to etree explains it:

Element.findall() finds only elements with a tag which are direct children of the current element. 

IMHO it's also the obvious outcome for anybody familiar with XML and XPath.

[1] http://docs.python.org/3/library/xml.etree.elementtree.html#finding-interesting-elements
History
Date User Action Args
2022-04-11 14:57:13adminsetgithub: 55575
2013-07-05 23:12:36christian.heimessetstatus: open -> closed

nosy: + christian.heimes
messages: + msg192373

resolution: works for me
2011-03-02 01:34:21techtoniksetnosy: techtonik, docs@python
messages: + msg129846
2011-03-02 01:30:30techtoniksetassignee: docs@python

components: + Documentation
nosy: + docs@python
2011-03-02 01:30:22techtonikcreate