<p>Given the following XML structure</p>

<pre><code>&lt;html&gt;
  &lt;body&gt;
    &lt;div&gt;
      &lt;span&gt;Test: Text2&lt;/span&gt;
    &lt;/div&gt;
    &lt;div&gt;
      &lt;span&gt;Test: Text3&lt;/span&gt;
    &lt;/div&gt;
    &lt;div&gt;
      &lt;span&gt;Test: Text5&lt;/span&gt;
    &lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>What is the best XPath query to locate any <code>span</code> with text that starts with <code>Test</code>?</p>

```
```
//span[starts-with(.,'Test')]
```
```
References:
http://www.w3.org/TR/xpath/#function-starts-with
https://developer.mozilla.org/en-US/docs/Web/XPath/Functions/starts-with