diff options
author | Ammar Askar <ammar@ammaraskar.com> | 2020-11-09 07:02:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-09 07:02:39 (GMT) |
commit | 97e8b1eaeaf3aa325c84ff2e13417c30414d0269 (patch) | |
tree | d1979f9ac520d18afa0e089568dfb92794a64e44 /Doc/library | |
parent | 4eb41d055e8307b8206f680287e492a6db068acd (diff) | |
download | cpython-97e8b1eaeaf3aa325c84ff2e13417c30414d0269.zip cpython-97e8b1eaeaf3aa325c84ff2e13417c30414d0269.tar.gz cpython-97e8b1eaeaf3aa325c84ff2e13417c30414d0269.tar.bz2 |
bpo-40624: Add support for the XPath != operator in xml.etree (GH-22147)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/xml.etree.elementtree.rst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index f4bccf6..87f4ee3 100644 --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -455,6 +455,12 @@ Supported XPath syntax | | has the given value. The value cannot contain | | | quotes. | +-----------------------+------------------------------------------------------+ +| ``[@attrib!='value']``| Selects all elements for which the given attribute | +| | does not have the given value. The value cannot | +| | contain quotes. | +| | | +| | .. versionadded:: 3.10 | ++-----------------------+------------------------------------------------------+ | ``[tag]`` | Selects all elements that have a child named | | | ``tag``. Only immediate children are supported. | +-----------------------+------------------------------------------------------+ @@ -463,10 +469,22 @@ Supported XPath syntax | | | | | .. versionadded:: 3.7 | +-----------------------+------------------------------------------------------+ +| ``[.!='text']`` | Selects all elements whose complete text content, | +| | including descendants, does not equal the given | +| | ``text``. | +| | | +| | .. versionadded:: 3.10 | ++-----------------------+------------------------------------------------------+ | ``[tag='text']`` | Selects all elements that have a child named | | | ``tag`` whose complete text content, including | | | descendants, equals the given ``text``. | +-----------------------+------------------------------------------------------+ +| ``[tag!='text']`` | Selects all elements that have a child named | +| | ``tag`` whose complete text content, including | +| | descendants, does not equal the given ``text``. | +| | | +| | .. versionadded:: 3.10 | ++-----------------------+------------------------------------------------------+ | ``[position]`` | Selects all elements that are located at the given | | | position. The position can be either an integer | | | (1 is the first position), the expression ``last()`` | |