mibe / FeedWriter

PHP Universal Feed Generator

Home Page:http://ajaxray.com/blog/php-universal-feed-generator-supports-rss-10-rss-20-and-atom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use PHP's XML functions for generating the XML.

mibe opened this issue · comments

I think it is time to replace the internal methods makeHeader(), makeChannels(), makeItems(), makeFooter() and makeNode() with PHP's own functions to generate the XML output. The current methods have some quirks like the two described in #23 and #18 (last comment).

There are plenty of function & classes to choose from. SimpleXML, XMLWriter or even the full DOM classes look promising. However, these classes are / were extensions and not always available on every PHP installation. This depends heavily on the server configuration. And that's the advantage of having the XML assembled in own methods: It's very unlikely that plain string functions are deactivated. 😉