RSS is useful as a creator because it's so under-specified that you can create valid RSS with virtually no effort (ie: printf). It's a huge pain to consume it because every single library needs to have crazy hacks to do things like double-unescaping HTML.
Atom is the better format, but - like any time you work with XML - you should never try to hand-bomb string output. Use an XML library, or preferably an Atom library.
I’d be far happier emitting Atom via printf than RSS via printf. The Atom spec tells me what I should write, whereas RSS goes in for unspecified behaviour and exotic date formats that force me to look up strftime. Beyond that, they’re both XML, which is easy to write.
Atom is the better format, but - like any time you work with XML - you should never try to hand-bomb string output. Use an XML library, or preferably an Atom library.