xpath: Fix nesting predicates (#1158)
we need to use `.//` instead of `//` inside the predicate
This commit is contained in:
parent
269c709c61
commit
b407143e5e
2
xpath.md
2
xpath.md
|
@ -234,7 +234,7 @@ Order is significant, these two are different.
|
||||||
### Nesting predicates
|
### Nesting predicates
|
||||||
|
|
||||||
```
|
```
|
||||||
//section[//h1[@id='hi']]
|
//section[.//h1[@id='hi']]
|
||||||
```
|
```
|
||||||
|
|
||||||
This returns `<section>` if it has an `<h1>` descendant with `id='hi'`.
|
This returns `<section>` if it has an `<h1>` descendant with `id='hi'`.
|
||||||
|
|
Loading…
Reference in New Issue