NAME
eBay::API::Simple::HTML
SYNPOSIS
my $call = ebay::API::Simple::HTML->new();
$call->execute( 'http://www.timkeefer.com/blog/view/portfolio' );
if ( $call->has_error() ) {
die "Call Failed:" . $call->errors_as_string();
}
# getters for the response DOM or Hash
my $dom = $call->response_dom();
my $hash = $call->response_hash();
# collect all h2 nodes
my @h2 = $dom->getElementsByTagName('h2');
foreach my $n ( @h2 ) {
print $n->findvalue('text()') . "\n";
}
new
Constructor for the HTML API call
my $call = ebay::API::Simple::HTML->new();
$call->execute( 'http://www.timkeefer.com/blog/view/portfolio' );
execute( $url )
Calling this method will make build and execute the api request.
$url = page to fetch
$call->execute( 'http://www.timkeefer.com' );
response_hash
Custom response_hash method, uses the output from LibXML to generate the hash instead of the raw response body.
response_dom
Custom response_dom method, provides a more relaxed parsing to better handle HTML.
_get_request_body
This methods supplies an empty request body for the HTML API call
_get_request_headers
This methods supplies the headers for the HTML API call
_get_request_object
This method creates the request object and returns to the parent class
AUTHOR
Tim Keefer <tim@timkeefer.com>
COPYRIGHT
Tim Keefer 2009