I am trying to pull an exact table during a "web scrape." Used cURL to pull page into $html, which succeeds fine.
Used Firebug to get exact XPATH to the table needed.
Code follows:
$dom = new DOMDocument($html); $dom->loadHTML($html); $xpath = new DOMXpath($dom); $summary = $xpath->evaluate('/html/body/table[5]/tbody/tr/td[3]/table/tbody/tr[8]/td/table'); echo "Summary Length: " . $summary->length; When executed, $summary->length is always zero. It doesn't pull that table node.
Any ideas?