title: Testing text() nodes vs string values in XPath
body: <p>I have a node as follows:   </p>
  
  <pre><code>&lt;span class="portal-text-medium"&gt;Office Hours&lt;/span&gt;
  </code></pre>
  
  <p>For the XPath I use </p>
  
  <pre><code>//span[text()='Office Hours']
  </code></pre>
  
  <p>which should work, but it never does.  I can use <code>*contains(text(),'Office Hours')]*</code> but that won't find an exact match and I have to verify there is no "*".  This is not the only time it hasn't worked for me.  I have seen it work before so I don't know what is wrong.  Any idea?</p>
  
  <p>Yes I can, and do, use <code>starts-with</code> but it is not quite the same.</p>