XML::RSS::Tools > example 1

# XML::RSS::Tools

## Example 1

This very simple example shows how to create a basic command line tool. The script would be called from the command line with a call with a URI to collect the RSS file from and the file to transform the XML with, and output going to STDOUT.

    #!/usr/bin/perl
    use strict;
    use XML::RSS::Tools;

    my $rss  = XML::RSS::Tools->new;
    if ($rss->rss_uri(shift) &&
        $rss->xsl_file(shift) &&
        $rss->transform) {
        	print $rss->as_string
        } else {
        	print $rss->as_string('error')
        };

Copyright iredale Consulting 2002-2003