Subject: | Parsing and generating RSS feed removed atom ns and links |
I included a test file that shows that a feed parsed from a file will
neglect to output the 'atom' namespace declaration and the two
'atom:link's from the input.
I would expect this namespace and the two links to be recreated in the
output.
Subject: | xml-rss-atom.t |
use Test::More tests => 1;
use Test::Differences;
use XML::RSS;
my $rss = XML::RSS->new();
my $input = <<"INPUT";
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
>
<channel>
<title>Example.com feed</title>
<link>http://example.com/</link>
<description></description>
<atom:link href="http://pubsubhubbub.example.com" rel="hub"/>
<atom:link href="http://example.com/feed/rss.xml" rel="self" type="application/rss+xml"/>
</channel>
</rss>
INPUT
$rss->parse($input);
eq_or_diff($rss->as_string . "\n", $input);