0

This is a detailing of my question here. I have the following nodes which I want to select with xpath:

<tr>
    <td class="name" title="43PUS6551" datalabel="43PUS6551">

How should the xpath query be formulated to find all //tr/td nodes where the value of attribute title is equal to the value of attribute datalabel?

Surely totally easy - but I just can not get there and find nothing suitable here or anywhere else on the net.

Black Senator
  • 449
  • 3
  • 11

1 Answers1

2

You just need to use this XPath, with the @ to indicate the attributes...

//tr/td[@title=@datalabel]
kjhughes
  • 106,133
  • 27
  • 181
  • 240
Nigel Ren
  • 56,122
  • 11
  • 43
  • 55