| Server IP : 217.160.0.64 / Your IP : 216.73.217.111 Web Server : Apache System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux User : ws67269618 ( 67269618) PHP Version : 8.4.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /kunden/kunden/proc/self/root/usr/share/doc/libxml-rss-perl/examples/1.0/ |
Upload File : |
#!/usr/bin/perl -w
# this script adds a new item to an existing rss file and
# updates the channel date and publisher
use XML::RSS;
# create a new instance of the XML::RSS
my $rss = XML::RSS->new;
# parse the local file
$rss->parsefile("rss1.0.rdf");
# add a new item to the file
$rss->add_item(
title => "QScheme 0.2.2",
link => "http://freshmeat.net/news/1999/06/21/930003829.html",
description => "Really fast, small and easy to interface Scheme interpreter",
dc => {
subject => "X11/Utilities",
creator => "David Allen (s2mdalle at titan.vcu.edu)",
},
);
# update the dublin core information for the channel
$rss->channel(dc => {
date => "2000-01-01T12:00+00:00",
publisher => "Jonathan Eisenzopf (eisen\@xif.com)"
}
);
# print the new rss file as a string. We could also save it
to a file with the save() routine.
print $rss->as_string;