1

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?

1
  • AFAIK, this is not possible in pure CSS.
    – supputuri
    Commented Jul 25, 2019 at 3:41

1 Answer 1

1

There isn't a CSS selector equivalent for

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.