From 101a5e84acbab9d880e150195f23185dfb5449a9 Mon Sep 17 00:00:00 2001 From: scoder Date: Sat, 30 Sep 2017 15:35:21 +0200 Subject: bpo-31648: Improve ElementPath (#3835) * Allow whitespace inside of ElementPath predicates. * Add ElementPath predicate support for text comparison of the current node, like "[.='text']". --- Doc/library/xml.etree.elementtree.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Doc/library/xml.etree.elementtree.rst') diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index 7d814ad406..61808596a5 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``. | -- cgit v1.2.1