Permalink
Browse files

as_xml() version without using XML::Atom

it just passes down to the caller the raw xml received over xmpp
  • Loading branch information...
1 parent 6a0b2c1 commit a2eb90039b16c96a423f94c5f1afa5270c4d31a3 @yannk yannk committed with Superfeedr.com Mar 12, 2010
Showing with 9 additions and 2 deletions.
  1. +9 −2 lib/AnyEvent/Superfeedr/Notification.pm
@@ -36,8 +36,15 @@ sub as_atom_feed {
sub as_xml {
my $notification = shift;
- my $feed = $notification->as_atom_feed;
- return $feed->as_xml;
+ my $feed = <<EOX;
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://purl.org/atom/ns#">
+EOX
+ for my $item (@{ $notification->items}) {
+ my ($entry) = $item->nodes;
+ $feed .= $entry->as_string;
+ }
+ $feed .= "</feed>";
}
1;

0 comments on commit a2eb900

Please sign in to comment.