I am trying to pull out the exact table during a "scratch on the Internet". Used cURL to pull out the page in $ html, which succeeds.
Used by Firebug to get the exact XPATH for a table.
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, the length of $ summary-> is always zero. It does not pull this node table.
Any ideas?
Faasie
source
share