title: xpath select parent based on (relative) child content
body: <p>This xpath returns both divs with the class theclass, I want to match based on it having a span with specific text content. (The real world usage the span is nested under a many nodes) so i don't want to specify the whole path for the span from the parent node.</p>
  
  <p>I want to just return the first div.</p>
  
  <p>XPATH</p>
  
  <pre><code>//div[contains(@class, "theclass")][//span[text()="this"]]
  </code></pre>
  
  <p>HTML / XML</p>
  
  <pre><code>&lt;html&gt;
  &lt;div class="theclass"&gt;
  &lt;ul&gt;
  &lt;li&gt;
      &lt;strong&gt;f&lt;/strong&gt;
      &lt;span&gt;this&lt;/span&gt;
  &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;div class="theclass"&gt;
  &lt;ul&gt;
  &lt;li&gt;
      &lt;strong&gt;g&lt;/strong&gt;
      &lt;span&gt;no&lt;/span&gt;
  &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;div class="notclass"&gt;
  &lt;ul&gt;
  &lt;li&gt;
      &lt;strong&gt;h&lt;/strong&gt;
      &lt;span&gt;not&lt;/span&gt;
  &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/html&gt;
  </code></pre>