XML::Filter::YahooGroups - SAX2 filter for adding message bodies to Yahoo Groups RSS listings.
use XML::SAX::Writer; use XML::Filter::YahooGroups; use XML::SAX::ParserFactory;
use LWP::Simple;
my $writer = XML::SAX::Writer->new(); my $filter = XML::Filter::YahooGroups->new(Handler=>$writer); my $parser = XML::SAX::ParserFactory->parser(Handler=>$filter);
$parser->parse_string(get("http://groups.yahoo.com/group/weblog-devel/messages?rss=1"));
SAX2 filter for adding message bodies to Yahoo Groups RSS listings.
The body of the message is added using the Dublin Core <dc:content> element :
<item> <title>Joe User</title> <link>http://groups.yahoo.com/group/some-group/message/123</link> <description>Yadda yadda yadda</description> <dc:content xmlns:dc='http://purl.org/dc/elements/1.1'> <![CDATA[ blah blah blah ]]> </dc:content> </item>
This package inherits from XML::SAX::Base.
Store login information, if necessary. Arguments should be passed as
$pkg->login(username=>password)
0.1
October 02, 2002
Aaron Straup Cope
Error handling.
The contents of the <dc:content> are not wrapped in <![CDATA[ ]]> tags due to some degree of weirdness with XML::SAX::Writer (?). In the meantime, the message body has been properly tickled so that the document parses as well-formed XML.
Copyright (c) 2002, Aaron Straup Cope. All Rights Reserved.
This is free software, you may use it and distribute it under the same terms as Perl itself.