my $wanted_table = $document->querySelector('div.foo table');