diff -r 3213fe4a72e0 Doc/library/xml.etree.elementtree.rst --- a/Doc/library/xml.etree.elementtree.rst Fri Feb 22 07:53:23 2013 +0200 +++ b/Doc/library/xml.etree.elementtree.rst Sat Feb 23 17:48:59 2013 +0100 @@ -711,9 +711,9 @@ .. method:: find(match) - Finds the first toplevel element matching *match*. *match* may be a tag - name or path. Same as getroot().find(match). Returns the first matching - element, or ``None`` if no element was found. + Finds the first subelement matching *match*, starting at the root of the + tree. *match* may be a tag name or path. Same as getroot().find(match). + Returns the first matching element, or ``None`` if no element was found. .. method:: findall(match) @@ -725,12 +725,13 @@ .. method:: findtext(match, default=None) - Finds the element text for the first toplevel element with given tag. - Same as getroot().findtext(match). *match* may be a tag name or path. - *default* is the value to return if the element was not found. Returns - the text content of the first matching element, or the default value no - element was found. Note that if the element is found, but has no text - content, this method returns an empty string. + Finds the element text for the first subelement matching *match*, + starting at the root of the tree. Same as getroot().findtext(match). + *match* may be a tag name or path. *default* is the value to return if + the element was not found. Returns the text content of the first + matching element, or the default value no element was found. Note that + if the element is found, but has no text content, this method returns + an empty string. .. method:: getiterator(tag=None) diff -r 3213fe4a72e0 Lib/xml/etree/ElementTree.py --- a/Lib/xml/etree/ElementTree.py Fri Feb 22 07:53:23 2013 +0200 +++ b/Lib/xml/etree/ElementTree.py Sat Feb 23 17:48:59 2013 +0100 @@ -683,8 +683,8 @@ return list(self.iter(tag)) ## - # Finds the first toplevel element with given tag. - # Same as getroot().find(path). + # Finds the first subelement with the given tag, starting at the root + # of the tree. Same as getroot().find(path). # # @param path What element to look for. # @keyparam namespaces Optional namespace prefix map. @@ -704,10 +704,11 @@ return self._root.find(path, namespaces) ## - # Finds the element text for the first toplevel element with given - # tag. Same as getroot().findtext(path). + # Finds the element text for the first subelement element with + # the given tag, starting at the root of the tree. Same as + # getroot().findtext(path). # - # @param path What toplevel element to look for. + # @param path What element to look for. # @param default What to return if the element was not found. # @keyparam namespaces Optional namespace prefix map. # @return The text content of the first matching element, or the @@ -729,8 +730,8 @@ return self._root.findtext(path, default, namespaces) ## - # Finds all toplevel elements with the given tag. - # Same as getroot().findall(path). + # Finds all subelements with the given tag, starting at the root + # of the tree. Same as getroot().findall(path). # # @param path What element to look for. # @keyparam namespaces Optional namespace prefix map.