diff options
author | scoder <stefan_ml@behnel.de> | 2017-09-30 13:35:21 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-09-30 13:35:21 (GMT) |
commit | 101a5e84acbab9d880e150195f23185dfb5449a9 (patch) | |
tree | 9fd7915a7e4049f33f9d083312d2c1b78d4eeb38 /Doc/library/xml.etree.elementtree.rst | |
parent | 9811e80fd0ed9d74c76a66f1dd4e4b8afa9e8f53 (diff) | |
download | cpython-101a5e84acbab9d880e150195f23185dfb5449a9.zip cpython-101a5e84acbab9d880e150195f23185dfb5449a9.tar.gz cpython-101a5e84acbab9d880e150195f23185dfb5449a9.tar.bz2 |
bpo-31648: Improve ElementPath (#3835)
* Allow whitespace inside of ElementPath predicates.
* Add ElementPath predicate support for text comparison of the current node, like "[.='text']".
Diffstat (limited to 'Doc/library/xml.etree.elementtree.rst')
-rw-r--r-- | Doc/library/xml.etree.elementtree.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index 7d814ad..6180859 100644 --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -437,6 +437,11 @@ Supported XPath syntax | ``[tag]`` | Selects all elements that have a child named | | | ``tag``. Only immediate children are supported. | +-----------------------+------------------------------------------------------+ +| ``[.='text']`` | Selects all elements whose complete text content, | +| | including descendants, equals the given ``text``. | +| | | +| | .. versionadded:: 3.7 | ++-----------------------+------------------------------------------------------+ | ``[tag='text']`` | Selects all elements that have a child named | | | ``tag`` whose complete text content, including | | | descendants, equals the given ``text``. | |