Aleksey Dr.
Aleksey Dr.

Reputation: 642

CSS selector equivalent for xpath selector

I'm quit new to CSS selector and I need to construct CSS selector that will look for row (items with same r='') in html, where in first column value is x1 and column n value is x3 For the purpose I got xpath //cell[@c='0'][@val='x1'][@r=following::cell[@val='x3']/@r]

Simplified xml equivalent

<r>
  <cell c='0' r='0' val='x1'/>
  <cell c='1' r='0' val='x1'/>
  <cell c='2' r='0' val='x1'/>

  <cell c='0' r='1' val='x1'/>
  <cell c='1' r='1' val='y1'/>
  <cell c='2' r='1' val='y1'/>

  <cell c='0' r='2' val='x1'/>
  <cell c='1' r='2' val='x3'/>
  <cell c='2' r='2' val='x3'/>
</r>

Could someone suggest CSS selector that solves the task?

Upvotes: 1

Views: 304

Answers (1)

BoltClock
BoltClock

Reputation: 723668

There isn't a CSS selector equivalent for

  1. referencing attribute values across different elements
  2. the following:: axis

Upvotes: 1

Related Questions