title: XPath element/object is undefined when using document.evaluate
body: <p>How can I fix the regular JavaScript code so it doesn't say "undefined" and displays the value of the input field?  The jQuery code works fine and displays the input field value correctly on the same page.</p>
  
  <p><strong>Regular JavaScript:</strong></p>
  
  <pre><code>var obj = document.evaluate('//html/body/form/div[4]/label/input',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null); 
  
  alert(obj.value);
  </code></pre>
  
  <p><strong>JQuery 1.7.1 code:</strong></p>
  
  <pre><code>var obj = $('html &gt; body &gt; form &gt; div:nth-child(4) &gt; label &gt; input');
  
  alert(obj.value);
  </code></pre>