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
  • 369
  • 2
  • 11

1 Answers1

2

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

//tr/td[@title=@datalabel]
kjhughes
  • 98,039
  • 18
  • 159
  • 218
Nigel Ren
  • 53,991
  • 11
  • 38
  • 52