#!/usr/bin/perl 

use LWP::Simple;

$url = "http://shortnews.stern.de/rss/Wirtschaft.xml";
#$url = "http://news.bbc.co.uk/rss/newsonline_world_edition/business/economy/rss.xml";

my $doc = get( $url );
my $text = &XmlParser( \$doc );

sub XmlParser() {

	my $file	= shift;
	my @all		= split(/<.*?>(.*?)<\/.*?>/, ${$file});
	my $text;

	foreach my $content ( @all ) {
		next if ( $content !~ /(\w)/ );
		next if ( $content =~ /<.*?>/ );
		next if ( $content =~ /<\/.*?>/ );
		$text = $text . "$content\n";
	};

	return $text;

};
