Is there any Generic RSS/ATOM generator in Python?
Stefan Behnel
stefan_ml at behnel.de
Thu Feb 14 08:50:58 EST 2008
Torsten Bronger wrote:
> Stefan Behnel writes:
>
>> Torsten Bronger wrote:
>>
>>> [...]
>>>
>>> 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":
>>
>> http://effbot.org/zone/element-builder.htm
[...]
> If you have more complex tasks, all this may be true; however,
> generating Atom is just *so* simple that I prefer the version which
> works without tweaking and further dependencies.
The E factory is a small module with one main class. Adding that to your code
base doesn't give you any dependencies...
Stefan
More information about the Python-list
mailing list