]> granicus.if.org Git - python/commitdiff
Issue #12322: clarify xpath reference for cases where the path reaches ancestors...
authorEli Bendersky <eliben@gmail.com>
Tue, 9 Oct 2012 13:46:33 +0000 (06:46 -0700)
committerEli Bendersky <eliben@gmail.com>
Tue, 9 Oct 2012 13:46:33 +0000 (06:46 -0700)
Doc/library/xml.etree.elementtree.rst

index 16bb00c1e53f06fdf579e13253aa3aa1a97f3f05..cd4a4900fdeb080b261db86608163ce10551c326 100644 (file)
@@ -291,7 +291,9 @@ Supported XPath syntax
 |                       | current  element.  For example, ``.//egg`` selects   |
 |                       | all ``egg`` elements in the entire tree.             |
 +-----------------------+------------------------------------------------------+
-| ``..``                | Selects the parent element.                          |
+| ``..``                | Selects the parent element.  Returns ``None`` if the |
+|                       | path attempts to reach the ancestors of the start    |
+|                       | element (the element ``find`` was called on).        |
 +-----------------------+------------------------------------------------------+
 | ``[@attrib]``         | Selects all elements that have the given attribute.  |
 +-----------------------+------------------------------------------------------+
@@ -521,7 +523,7 @@ Element Objects
    .. method:: clear()
 
       Resets an element.  This function removes all subelements, clears all
-      attributes, and sets the text and tail attributes to None.
+      attributes, and sets the text and tail attributes to ``None``.
 
 
    .. method:: get(key, default=None)