. . use XML::LibXML; # Plus the other modules above . . my $uri = "http://www.perlmonks.org/index.pl?node_id=30175&sinceunixtime=20020820"; . # Parse out XML using LibXML to a string my $doc = $parser->parse_file($uri); my $root = $doc->getDocumentElement; my $file = $doc->toString; my $xpath = XML::XPath->new(xml=>"$file"); [...And resume the above code.]