|
I have modified my code to include the changes that you mentioned but I still seem to get the same result. I just can't seem to figure out where my problem lies. Here's my new code:
use LWP::Simple;
use HTML::TreeBuilder::XPath;
my $tree= HTML::TreeBuilder::XPath->new;
$html = get("http://moneycentral.msn.com/investor/invsub/results/compare.asp?Page=TenYearSummary&Sy
+mbol=WHT");
$tree->parse_file($html);
$xpath = '/html/body/div[@id="wrapper"]';
print "$html\n"; #This prints the HTML just fine
if ($tree->exists($xpath)) {
print "$xpath: Exists!\n";
} else {
print "$xpath: Doesn't exist!\n";
}
Thanks.
-Joel
|