Forum Moderators: coopster
I'm trying to use php5's domxpath.
$dom = new domdocument;
@$dom->loadHTML($reply);$xpath = new domxpath($dom);
$xpath->query('/html/body/form/center/table[2]/tbody/tr[3]/td/font');
for($i=0; $i<$xNodes->length; $i=$i+2)
{
$output .= "\n" . $xNodes->item($i+1)->nodeValue . ' ' . $xNodes->item($i)->nodeValue;
print $xNodes->previousSibling->nodeValue;
}
Problem is, I can't seem to get the "innerHTML" of the xpath. Is there some sort of xpath function that will let me do something like print_r() or var_dump() and get the values of the selected node. It can be php, or a firefox extension - I just need help learning to navigate with xpath.
Any ideas?
Thanks!
Erik
DOM Functions [us2.php.net]