As I needed to create some custom XMLs for a project I am working on, I have created an Yii extension based on a nice class which was developed by Simon Willison.
Using this simple extension, everyone will be easily able to generate an XML.
Hm, there is none yet. It works roughly like this: A set of data is serialized into XML with help of domxml by the CXslViewRenderer which will then apply some XSL against that. In return: Generic XML of any flavour
The FeedController of the blog demo should give a good example.
But when it shows the xml var on screen, it shws first line blank. This cause an XML error, because first xml line must be <?xml version="1.0" encoding="utf-8"?>
What can I do? Seems that yii create this blank line, and not the extension.
Would you please download again the .zip folder and just replace the xmlgenerator.php file on your application? It should work fine now, please let me know.
I know it’s a quite old thread but I’m stuck on the same problem…
I’m trying to generate a xml rss feed trough Controller but Yii keeps showing the first line blank.
I’m using an filter to remove blank lines from all pages on my RssController (this one) and I also put the ob_end_clean() in my rss layout. It’s working fine locally, however, on my host it keeps showing the blank first line