Is there any Generic RSS/ATOM generator in Python?
ebgssth at gmail.com
Thu Feb 14 14:59:32 CET 2008
I guess I should have learned more about ElementTree.
In anyway, Thanks all. You all convinced me, really.
On 2/14/08, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Torsten Bronger wrote:
> > js writes:
> >> Trivial?
> >> More than XML::Atom::Feed?
> >> http://search.cpan.org/~miyagawa/XML-Atom-0.28/lib/XML/Atom/Feed.pm
> > Excerpt from my code:
> > root = ElementTree.Element("feed", xmlns="http://www.w3.org/2005/Atom")
> > ElementTree.SubElement(root, "id").text = self.id
> > ElementTree.SubElement(root, "title").text = self.title
> > ElementTree.SubElement(root, "updated").text = format_time(self.updated)
> Look at the bottom of this page for an RSS example using the "E factory":
> I find it much more readable than the above code, especially if you use the
> version that comes with lxml.objectify, which has better support for
> namespaces and data types:
More information about the Python-list