title: XPath not working as expected [php]
body: <p>I often use XPath with php for parsing pages,
  but this time i don't understand the behavior with this specific page with the following code, I hope you can help me on this.</p>
  
  <p>Code that I use to parse this page <a href="http://www.jeuxvideo.com/recherche.php?m=9&amp;t=10&amp;q=Call+of+duty" rel="nofollow noreferrer">http://www.jeuxvideo.com/recherche.php?m=9&amp;t=10&amp;q=Call+of+duty</a> :</p>
  
  <pre><code>&lt;?php
  $What = 'Call of duty';
  $What = urlencode($What);
  $Query = 'http://www.jeuxvideo.com/recherche.php?m=9&amp;t=10&amp;q='.$What;
  
  $ch = curl_init();     
  curl_setopt($ch, CURLOPT_URL, $Query);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
  $response = curl_exec($ch);
  curl_close($ch);
  
  /*
  $search = array("&lt;article", "&lt;/article&gt;");
  $replace = array("&lt;div", "&lt;/div&gt;");
  $response = str_replace($search, $replace, $response);
  */
  
  $dom = new DOMDocument();
  @$dom-&gt;loadHTML($response);
  
  $xpath = new DOMXPath($dom);
  
  $elements = $xpath-&gt;query('//article[@class="recherche-aphabetique-item"]/a');
  
  //$elements = $xpath-&gt;query('//div[@class="recherche-aphabetique-item"]/a');
  
  count($elements);
  
  var_dump($elements);
  ?&gt;
  </code></pre>
  
  <p>fiddle to test it :
  <a href="http://phpfiddle.org/main/code/r9n6-d0j0" rel="nofollow noreferrer">http://phpfiddle.org/main/code/r9n6-d0j0</a></p>
  
  <p>I just want to get all "a" nodes that are in "article" nodes with the class "recherche-aphabetique-item".</p>
  
  <p>But it returns me nothing :/. </p>
  
  <p>As you can see in the commented code I've tried to replace html5 elements articles to div, but I got the same behavior.</p>
  
  <p>Thanks four your help.</p>