title: Get the text value of nextsibling through document.evaluate
body: <p>I have the following table data to traverse in my HTML:</p>
  
  <pre><code>&lt;table id="publicationTable" cellpadding="2" cellspacing="0"&gt;
  &lt;tr&gt;
  &lt;td vAlign="top"&gt;&lt;IMG SRC="/images/icons/general/spacer.gif" width="20" height="1"&gt;&lt;/td&gt;
  &lt;td class="SmallColHeading"&gt;Published     &lt;/td&gt;
  &lt;td class="ColRow"&gt;Publisher, place and date of publication&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td vAlign="top"&gt;&lt;IMG SRC="/images/icons/general/spacer.gif" width="20" height="1"&gt;&lt;/td&gt;
  &lt;td class="SmallColHeading"&gt;
  Format     &lt;/td&gt;
  &lt;td class="ColRow"&gt;
  vii, 201 pages ; 23 cm.     &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>I want to output the text "vii, 201 pages ; 23. cm." with document.evaluate but I am missing something. The thing is that the selector should be td with class attribute value "SmallColHeading" and that has (contains) a text node/value of Format.</p>
  
  <pre><code>var Pagination = document.evaluate("//td[contains(., 'Format')]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null );
  var Pagination2 = Pagination.nextSibling.innerHTML;
  if (Pagination.singleNodeValue) {
                  var Pages = Pagination.singleNodeValue.textContent;
              }
  alert(Pagination2);
  alert(Pages);
  </code></pre>
  
  <p>I'm trying various combinations specially after nextSibling like removing innerHTML (I'm getting undefined) or replacing it with textContent (I'm getting Cannot read property 'textContent'). I'm struggling with traversing nextSibling through javascript on this HTML since tr does not even have an id value and this all what we have we have in the system. Thanks in advance!</p>