From b407143e5e90bfe5d806a6250fe817186d3f05e1 Mon Sep 17 00:00:00 2001 From: Anton Pozhidaev Date: Mon, 3 Aug 2020 15:34:28 +0300 Subject: [PATCH] xpath: Fix nesting predicates (#1158) we need to use `.//` instead of `//` inside the predicate --- xpath.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xpath.md b/xpath.md index afbe5e42..5b75592a 100644 --- a/xpath.md +++ b/xpath.md @@ -234,7 +234,7 @@ Order is significant, these two are different. ### Nesting predicates ``` -//section[//h1[@id='hi']] +//section[.//h1[@id='hi']] ``` This returns `
` if it has an `

` descendant with `id='hi'`.