Atom conversion tools

These are free XSL stylesheets that you can use to convert Atom 0.3 and Atom 1.0 feeds to RSS 2.0.

Based on Harvard RSS 2.0 Spec, Atom 1.0 RFC 4287 and Moving 0.3 to 1.0 by rakaz.

Atom 1.0 to RSS 2.0

atom2rss.xslXSLT with bug fixes and improvements by Geoffrey Swift, most notably optional use of PHP for robust date format conversion.

atom2rss-exslt.xsl – improvement of older version that uses EXSLT for proper handling of <pubDate> added by Gene McCulley.

Released under Creative Commons license.

Atom 0.3 to Atom 1.0

atom2atom.xsl – updates XML namespace and element names, supports some DublinCore extensions. Released as Public Domain.

How to use these stylesheets?

Just pass them together with Atom feed to any XSLT processor – there are lots of options, from command-line tools (like sablotron, msxml) to built-in support in scripting languages.

In PHP5 you can use DOM and XSL extensions:

$chan = new DOMDocument(); $chan->load('channel_atom.xml'); /* load channel */
$sheet = new DOMDocument(); $sheet->load('atom2rss.xsl'); /* use stylesheet from this page */
$processor = new XSLTProcessor();
$result = $processor->transformToXML($chan); /* transform to XML string (there are other options - see PHP manual)  */

Please do not hotlink these stylesheets. Copy them to your own server.

Bugs, patches

GitHub Project Page.


Free feed conversion service on Devtacular.

hAtom → Atom → RSS transcoder.

2006.04, updated 2009.03 by porneL (contact)