title: Incorrect xpath query
body: <p>I'm trying to aggregate the club phone numbers from this html. </p>
  
  <p>Here is my HTML:</p>
  
  <pre><code>&lt;div id="content"&gt;
    &lt;div class="container"&gt;
      &lt;div class="padded"&gt;
         &lt;ul class="state-list"&gt;
         &lt;ul class="state-city-list"&gt;
            &lt;li class="jumper"&gt;
          &lt;div class="clubinfo"&gt;
              &lt;div class="clubaddress"&gt;123 West Palm Blvd&lt;/div&gt;
              &lt;div class="clubphone"&gt;5555551123&lt;/div&gt;
          &lt;/div&gt;
            &lt;/li&gt;
         &lt;/ul&gt;                    
         &lt;ul class="state-city-list"&gt;
            &lt;li class="jumper"&gt;
          &lt;div class="clubinfo"&gt;
              &lt;div class="clubaddress"&gt;456 West Palm Blvd&lt;/div&gt;
              &lt;div class="clubphone"&gt;5555555456&lt;/div&gt;
          &lt;/div&gt;
            &lt;/li&gt;
         &lt;/ul&gt;
         &lt;ul class="state-city-list"&gt;
            &lt;li class="jumper"&gt;
          &lt;div class="clubinfo"&gt;
              &lt;div class="clubaddress"&gt;789 West Palm Blvd&lt;/div&gt;
              &lt;div class="clubphone"&gt;5555555789&lt;/div&gt;
          &lt;/div&gt;
            &lt;/li&gt;
         &lt;/ul&gt;
         &lt;ul class="state-city-list"&gt;
            &lt;li class="jumper"&gt;
          &lt;div class="clubinfo"&gt;
              &lt;div class="clubaddress"&gt;213 West Palm Blvd&lt;/div&gt;
              &lt;div class="clubphone"&gt;5555555213&lt;/div&gt;
          &lt;/div&gt;
            &lt;/li&gt;
         &lt;/ul&gt;
         &lt;/ul&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is my PHP Code:</p>
  
  <pre><code>    $htmlfile='phonecontents';
      $xml=new DOMDocument();
      $xml-&gt;preserveWhiteSpace=false;
      $xml-&gt;loadHTMLFile($htmlfile);
      $xpath = new DOMXpath($xml);
      //$elm = $xpath-&gt;query('/div[@id="content"]/div[@class="container"]/div[@class="padded"]/ul[@class="state-list"]/li[@class="jumper"]/div[@class="clubinfo"]/div[@class="clubphone"]');
      $elm = $xpath-&gt;query('/div[@id="content"]/div[@class="clubinfo"]/div[@class="clubphone"]');
      if(!is_null($elm)){
        var_dump($elm);
        foreach($elm as $el){
          echo $el-&gt;nodeValue."\n";
        }
      } else {
        echo "NO DATA FOUND \n";
      }
  </code></pre>
  
  <p>I'm not quite sure because i'm new to xpath but I am unable to get my data correctly. If you look at the php code you can see i tried with 2 different queries neither seemed to work.</p>