From 4610903e2345c252d0884b7f74d7ba565d3ba852 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Fri, 17 Apr 2015 15:51:15 +0800 Subject: [PATCH] Update xpath --- xpath.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/xpath.md b/xpath.md index 54fc73a37..2dffe1c96 100644 --- a/xpath.md +++ b/xpath.md @@ -23,15 +23,16 @@ layout: default ### Attribute selectors -| CSS | Xpath | ? | -| --- | --- | --: | -| `#id` | `//[@id="id"]` | [?](#predicates) | -| `.class` | `//[@class="class"]` *...see below* | | -| `input[type="submit"]` | `//input[@type="submit"]` | | -| `a#abc[for="xyz"]` | `//a[@id="abc"][@for="xyz"]` | [?](#chaining-order) | -| --- | --- | | -| `a[href^='/']` | `//a[starts-with(@href, '/')]` | [?](#string-functions) | -| `a[href$='pdf']` | `//a[ends-with(@href, '.pdf')]` | | +| CSS | Xpath | ? | +| --- | --- | --: | +| `#id` | `//[@id="id"]` | [?](#predicates) | +| `.class` | `//[@class="class"]` *...see below* | | +| `input[type="submit"]` | `//input[@type="submit"]` | | +| `a#abc[for="xyz"]` | `//a[@id="abc"][@for="xyz"]` | [?](#chaining-order) | +| --- | --- | | +| `a[href^='/']` | `//a[starts-with(@href, '/')]` | [?](#string-functions) | +| `a[href$='pdf']` | `//a[ends-with(@href, '.pdf')]` | | +| `a[href~='://']` | `//a[contains(@href, '://')]` *...kinda* | | {:.greycode.no-head} ### Order selectors