title: using XPath to find node under a context node does not work (firefox/firebug/javascript)
body: <p>I want to extract information from a web page.</p>
  
  <p>The page has m nodes, which can be found by .evaluate("//div[@class='news']", document, ....).</p>
  
  <p>For each of the above nodes, there are 3 nodes inside them. Each of them has different @class selector. And I want to extract these m 3-tuple records.</p>
  
  <p>I tried to use .evaluate() function as instructed in</p>
  
  <p><a href="https://developer.mozilla.org/en/Introduction_to_using_XPath_in_JavaScript" rel="noreferrer">https://developer.mozilla.org/en/Introduction_to_using_XPath_in_JavaScript</a></p>
  
  <p>by using this code</p>
  
  <pre><code>parentNodes = document.evaluate("//div[@class='news']", document, ....).
  while (true){
     var node = parentNodes.iterateNext();
     var child = document.evaluate("//div[@class='title']", node, ....). 
     ...
  }
  </code></pre>
  
  <p>However, "child" is always assigned to the first node in the document, instead of the first node within "node". </p>
  
  <p>I ran this in firebug console.</p>
  
  <p>Does any one know what's wrong?</p>