summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2021-07-04 22:14:29 +0200
committerStefan Behnel <stefan_ml@behnel.de>2021-07-04 22:14:29 +0200
commit9e8f18f051c7b3c3165366308f2eb86b18034116 (patch)
tree9f9411e8072116e4d5c00b9817f9b038e9a47142
parent65e8dd679f5fe21d860bb0e4a43743c63125a814 (diff)
downloadpython-lxml-9e8f18f051c7b3c3165366308f2eb86b18034116.tar.gz
Make the note about the (faster) .find*() methods in the XPath section stick out to suggest their use.
-rw-r--r--doc/html/style.css12
-rw-r--r--doc/xpathxslt.txt11
2 files changed, 20 insertions, 3 deletions
diff --git a/doc/html/style.css b/doc/html/style.css
index b399b3d0..7d1b0e67 100644
--- a/doc/html/style.css
+++ b/doc/html/style.css
@@ -321,6 +321,18 @@ html > .pagequote {
position: fixed;
}
+div.admonition {
+ border: solid 1px;
+ border-radius: 1ex;
+ margin: 0.5ex;
+ padding: 0.5ex 1.5ex 0.5ex 1.5ex;
+ background: lightyellow;
+}
+
+div.admonition > .admonition-title {
+ background: yellow;
+}
+
code {
color: Black;
background-color: #f0f0f0;
diff --git a/doc/xpathxslt.txt b/doc/xpathxslt.txt
index 8b2870e5..9eb9bcf7 100644
--- a/doc/xpathxslt.txt
+++ b/doc/xpathxslt.txt
@@ -63,9 +63,14 @@ comparison`_ to learn when to use which. Their semantics when used on
Elements and ElementTrees are the same as for the ``xpath()`` method described
here.
-Note that the ``.find*()`` methods are usually faster than the full-blown XPath
-support. They also support incremental tree processing through the ``.iterfind()``
-method, whereas XPath always collects all results before returning them.
+.. note::
+
+ The ``.find*()`` methods are usually *faster* than the full-blown XPath
+ support. They also support incremental tree processing through the
+ ``.iterfind()`` method, whereas XPath always collects all results before
+ returning them. They are therefore recommended over XPath for both speed
+ and memory reasons, whenever there is no need for highly selective XPath
+ queries.
.. _`performance comparison`: performance.html#xpath