From 35667e6a10e9ccb5bd4220ecea2db68334d3cd48 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Fri, 17 Apr 2015 15:46:46 +0800 Subject: [PATCH] Update xpath --- xpath.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/xpath.md b/xpath.md index b371c74b0..c23815c86 100644 --- a/xpath.md +++ b/xpath.md @@ -23,14 +23,14 @@ layout: default ### Attribute selectors -| CSS | Xpath | ? | -| --- | --- | | -| `input[type="submit"]` | `//input[@type="submit"]` | [?](#predicates) | -| `a[href^='/']` | `//a[starts-with(@href, '/')]` | [?](#string-functions) | -| `a[href$='pdf']` | `//a[ends-with(@href, '.pdf')]` | | -| --- | --- | | -| `#id` | `//[@id="id"]` | | -| `.class` | `//[@class="class"]` *...see below* | | +| CSS | Xpath | ? | +| --- | --- | | +| `#id` | `//[@id="id"]` | [?](#predicates) | +| `.class` | `//[@class="class"]` *...see below* | | +| `input[type="submit"]` | `//input[@type="submit"]` | | +| --- | --- | | +| `a[href^='/']` | `//a[starts-with(@href, '/')]` | [?](#string-functions) | +| `a[href$='pdf']` | `//a[ends-with(@href, '.pdf')]` | | {:.greycode.no-head} ### Order selectors @@ -45,7 +45,6 @@ layout: default | --- | --- | | | `a:first-child` | `//a[1]` | | | `a:last-child` | `//a[last()]` | | -| `li:first-of-type` | `//li[not(preceding-sibling::li)]` | | {:.greycode.no-head} ### jQuery