title: In XPath how do I select a node by text no matter which text child has it?
body: <p>I have some HTML code like this:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt; John
              &lt;font color="red"&gt;
              &lt;b&gt;Unemployed&lt;/b&gt;
              &lt;/font&gt;
              &lt;br/&gt;ID 12345&lt;b&gt;
              some Text&lt;/b&gt;
              &lt;br/&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>There are some more <code>tr</code> in the code but this is just an example
  I want to select the <code>td</code> node that has an specific ID text so in this case will be 12345.</p>
  
  <p>I could reach the ID with the following XPath: </p>
  
  <pre><code>HTML/TABLE/descendant::*[contains(text()[3], '12345')]
  </code></pre>
  
  <p>But I want to avoid the use of the index [3]. I also tried with</p>
  
  <pre><code>HTML/TABLE/descendant::*[contains(., '12345')] 
  </code></pre>
  
  <p>But that selects the <code>tbody</code>.</p>
  
  <p>Any idea how to do this?</p>