I must be completely missing something here. I can't seem to figure
out how to parse using the DOM in PHP5... For instance, as a test
I'm trying to scrape out the weather conditions table from:
I've tried several options, but am currently working on:
$url = 'http://www.ufl.edu/weather';
$dom = new DOMDocument();
$doc->validateOnPars e = true;
$dom->loadHTML($url) ;
$xpath = new DOMXPath($dom);
$result = $xpath->query("/html/body/div[@id='mainContai ner']/div/
table");
What am I missing here? If I query anything past '/html/body' I end
up with no result...?
Comment