tags:

views:

124

answers:

2

Hi,

I was wondering if anyone know how I could output content from Joomla as XML which I can then use in Flash? I would like to be able to use Joomla as the backend CMS and a Flash frontend which pulls and article's content from the CMS and outputs it as XML.

Something like this:

http://www.goforgold.org.za/scripts/News.php

Many thanks, James

A: 

Hmmm, your example doesn't work on my side. I get a blank page. You could try using Joomla's RSS feeds

PatrickS
Hi Patrick,You would have to open the link in Firefox. Chrome does not show the XML for some reason.I can't believe nobody's not written a module or something for Joomla to export the XML of articles so that one could use it in Flash. (hint hint)I might try the RSS feeds but it would have been nice to have raw xml output as in the example above.Thanks ;)
Sixfoot Studio
I do something similar with Wordpress but I don't use XML though, rather I access Wordpress functions and return the results to Flash. It works great but it's a heavier structure than simply pulling data from an RSS feed. Still, I've heard of solutions using RSS feeds and it does make sense since treating the feed as an XML should work well enough for what you need to do.
PatrickS
Ok, I will try that Patrick. Thanks a bunch!
Sixfoot Studio
A: 

You can do this using views. Most pages in a Joomla site are output as HTML, but you can easily change the 'view' to output XML. Where you see your files in com_component/views/view.html.php, you can use view.feed.php or even view.raw.php.

http://developer.joomla.org/tutorials/165-understanding-output-overrides-in-joomla.html and http://docs.joomla.org/Understanding_Output_Overrides

Jeepstone
Thanks Jeepstone! I will most certainly try that!
Sixfoot Studio
You might also need http://api.joomla.org/Joomla-Framework/Utilities/JSimpleXML.html if you need to parse the xml in any way.
Jeepstone
Thanks guys. I am going to try these suggestions and get back to you with what worked best for me.
Sixfoot Studio