Thursday, November 19, 2009

Embed RSS feed into a .XML file?

So I have a fairly complex setup that runs a .swf to display images on a website. It pulls directly from local .jpg files through a .xml file. I want it to pull from an RSS feed I created THROUGH the .xml file. (it must go through the .xml for the .swf to work). Here's the code the .xml uses to pull from the local folder:





?xml version="1.0" encoding="utf-8"?%26gt;


%26lt;photos%26gt;


%26lt;!-- Place your photos here --%26gt;


%26lt;photo desc="Picture is from stock.xchng" url="_pics/1.jpg" /%26gt;


%26lt;photo desc="Picture is from stock.xchng" url="_pics/2.jpg" /%26gt;


%26lt;/photos%26gt;





I just want it to embed my .rss into this file so the .swf will look at the .xml and it will point to my feed.

Embed RSS feed into a .XML file?
You'll need the rss tag and it's required sub-markup tags.


%26lt;?xml version="1.0" encoding="UTF-8"?%26gt;


%26lt;rss version="2.0"%26gt;


%26lt;channel%26gt;


%26lt;title%26gt;Your Title of the Feed%26lt;/title%26gt;


%26lt;description%26gt;Feed Description%26lt;/description%26gt;


%26lt;link%26gt;http://feed_link%26lt;/link%26gt;


%26lt;language%26gt;en-us%26lt;/language%26gt;


%26lt;item%26gt;


%26lt;title%26gt;Item 1 Name%26lt;/title%26gt;


%26lt;description%26gt;Brief item description%26lt;/description%26gt;


%26lt;pubDate%26gt;Tue, 06 Nov 2007 09:06:53 EST%26lt;/pubDate%26gt;


%26lt;guid isPermaLink="true"%26gt;a unique id%26lt;/guid%26gt;


%26lt;link%26gt;http://photo url%26lt;/link%26gt;


%26lt;/item%26gt;


%26lt;item%26gt;...repeat for next picture...%26lt;/item%26gt;


%26lt;/channel%26gt;


%26lt;/rss%26gt;





You can also add yahoo media rss tags for more media options.


No comments:

Post a Comment