tags:

views:

460

answers:

1

Give the following XML structure

<html>
  <body>
    <div>
      <span>Test: Text2</span>
    </div>
    <div>
      <span>Test: Text3</span>
    </div>
    <div>
      <span>Test: Text5</span>
    </div>
  </body>
</html>

What is the best xpath query to locate any span with text that starts with Test?

+7  A: 
//span[starts-with(.,'Test')]
A. Rex