From e39d7a1b523e62327a83a2f672b1b6135fdff335 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Fri, 17 Apr 2015 16:57:10 +0800 Subject: [PATCH] Clarify axes --- xpath.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xpath.md b/xpath.md index a3f306645..1aa158cae 100644 --- a/xpath.md +++ b/xpath.md @@ -253,9 +253,10 @@ Axes Steps of an expression are separated by `/`, usually used to pick child nodes. That's not always true: you can specify a different "axis" with `::`. ```sh -//ul/li # $('ul > li') -//ul/child::li # $('ul > li') - same -//ul/descendant-or-self::li # $('ul li') +//ul/li # ul > li +//ul/child::li # ul > li (same) +//ul/following-sibling::li # ul ~ li +//ul/descendant-or-self::li # ul li //ul/ancestor-or-self::li # $('ul').closest('li') ``` {:.light}