WebService::Simple::Parser::XML::Feed - Parse XML content using XML::Feed


WebService-Simple documentation Contained in the WebService-Simple distribution.

Index


Code Index:

NAME

Top

WebService::Simple::Parser::XML::Feed - Parse XML content using XML::Feed

SYNOPSIS

Top

  my $service = WebService::Simple->new(
    base_url => ...,
    response_parser => 'XML::Feed',
  );
  my $res = $service->get(...);
  my $feed = $res->parse_response();

METHODS

Top

new

parse_response

AUTHOR

Top

Yusuke Wada <yusuke@kamawada.com>


WebService-Simple documentation Contained in the WebService-Simple distribution.

package WebService::Simple::Parser::XML::Feed;
use strict;
use warnings;
use base qw(WebService::Simple::Parser);
use XML::Feed;

sub new {
    my $class = shift;
    my %args  = @_;
    my $self  = $class->SUPER::new(%args);
    return $self;
}

sub parse_response {
    my $self = shift;
    my $content = $_[0]->content;
    XML::Feed->parse( \$content );
}

1;

__END__