diff options
| author | Stefan Behnel <stefan_ml@behnel.de> | 2021-03-29 22:30:25 +0200 |
|---|---|---|
| committer | Stefan Behnel <stefan_ml@behnel.de> | 2021-03-29 22:30:25 +0200 |
| commit | ea954da3c87bd8f6874f6bf4203e2ef5269ea383 (patch) | |
| tree | a9b056d2986219621d7671aac3cee01c9bd1ac84 | |
| parent | 40caae02ad3b5e820a90e533ce9c009b6b390545 (diff) | |
| download | python-lxml-ea954da3c87bd8f6874f6bf4203e2ef5269ea383.tar.gz | |
Clarify that the ET compatibility difference for the '*' tag filter applies not only to ".iter()" but also to ".find*()".
| -rw-r--r-- | doc/compatibility.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/compatibility.txt b/doc/compatibility.txt index e23d1817..654cb7c4 100644 --- a/doc/compatibility.txt +++ b/doc/compatibility.txt @@ -146,11 +146,11 @@ ElementTree. Nonetheless, some differences and incompatibilities exist: not. This means that a comment text "text" that ElementTree serializes as "<!-- text -->" will become "<!--text-->" in lxml. -* When the string '*' is used as tag filter in the ``Element.getiterator()`` - method, ElementTree returns all elements in the tree, including comments and - processing instructions. lxml.etree only returns real Elements, i.e. tree - nodes that have a string tag name. Without a filter, both libraries iterate - over all nodes. +* When the string ``'*'`` is used as tag filter in the ``Element.iter()`` and + ``.find*()`` methods, ElementTree returns all elements in the tree, including + comments and processing instructions. lxml.etree only returns real Elements, + i.e. tree nodes that have a string tag name. Without a filter, both libraries + iterate over all nodes. Note that currently only lxml.etree supports passing the ``Element`` factory function as filter to select only Elements. Both libraries support passing |
