NO -- Use php to create the rss.xml file, by writing it to the server, as I mentioned earlier. It is a simple process.
Just name your current file rss_generator.php and put all the xml statement into a the header or content. This is what I have done... may need some debugging. This is some old code, and I took out some of it for simplicity.
include_once ('connect2db.php'); // connect to the database
$xmlFile = 'rss.xml';
// Generating RSS from PHP and MySQL Database.
$rss_header = "<?xml version='1.0' ?>\n";
$rss_header .= "<rss version='2.0'>\n";
$rss_header .= "<channel>\n";
$rss_header .= "<title>My Test Title</title>\n";
$rss_header .= "<image>\n";
$rss_header .= "<title>My Test Title</title>\n";
$rss_header .= "<link>http://www.mywebsite.com</link>\n";
$rss_header .= "<url>http://www.mywebsite.com/images/logosmall.jpg</url>\n";
$rss_header .= "</image>\n";
$rss_header .= "<link>http://www.mywebsite.com</link>\n";
$rss_header .= "<description>My description</description>\n";
$rss_header .= "<language>en-us</language>\n";
$rss_header .= "<copyright>Copyright 2011, Me</copyright>\n";
$rss_footer = "</channel>\n</rss>"; // end of rss
//Query to retrive data to update RSS and Twitter with.
$query = "SELECT Title, Author, Category, Introtext,Publish_Up, URLS, DATE_FORMAT(Publish_Up, '%a, %d %b %Y %T') AS MyDate, DATE_FORMAT(Publish_Up, '%Y-%m-%d %H:%i:%s') AS MyDate2 FROM content WHERE Priority > 0 AND Publish_Dwn > DATE_ADD(NOW(), INTERVAL 1 HOUR) ORDER BY ID DESC LIMIT 20";
//Format for Date_Format: "Fri, 28 Jul 2006 13:00 MST"
$result = mysql_query($query,$link);
$n = 0;
$rssItem ="";
date_default_timezone_set('America/Chicago');
$fileDate = date ("Y-m-d H:i:s", filemtime($xmlFile));
clearstatcache();
while ($a_row = mysql_fetch_array($result, MYSQL_ASSOC)){
// test for a new update (compare database date-time to rss.xml date-time)
if ($n == 0){
$newestDate = $a_row['MyDate2'];
//echo "New: ".$newestDate." File time: ".$fileDate."<br><br>";
}
// if date of file is older open the file for re-writing (open only once)
if ($n == 0 && $newestDate > $fileDate){
/* *********************************************************
*/
// continue with RSS feed update
$rssCategory = $a_row['Category'];
$rssDescription = substr(strip_tags(html_entity_decode($a_row['Introtext'])),0,200);
$rssDescription = addslashes(htmlspecialchars_decode($rssDescription,ENT_QUOTES));
if ($rssCategory == 1){
$rssItem = "<item>\n<title>". $a_row['Title']. "</title>\n<description>\n\n <![CDATA[ ".$rssDescription."[...] by ".$a_row['Author']." ]]>\n\n </description><link>" . $a_row['URLS'] . "</link>\n<guid>". $a_row['URLS']."</guid>\n<pubDate>" . $a_row['MyDate'] . " MST</pubDate>\n</item>\n\n";
}
if($rssCategory == 4 || $rssCategory == 5){
$rssItem = "<item>\n<title>Event or Alert</title>\n <description>\n\n <![CDATA[ " .$rssDescription. "... ]]>\n\n </description><link> http://www.mnsd56.com</link>\n<guid>http://www.mnsd56.com/#".$n."</guid>\n<pubDate>" . $a_row['MyDate'] . " CDT</pubDate>\n</item>\n\n";
}
$rssContent = $rssContent . $rssItem;
$rssDebug = $rssDebug ."<br> N= ". $n." ".$rssDescription; //keep adding more rssItems
$n++;
} // End of While Loop
// Completed the while loop, now write footer, close the RSS file and done.
if ($debug == 0 && $newestDate > $fileDate){
$fp = fopen($xmlFile, "w"); // make a new RSS file each time.
fwrite($fp, $rss_header);
fwrite($fp,$rssContent);
fwrite($fp, $rss_footer);
fclose($fp);
}
// That's all folks
If you start fiddling with running xml files as php files, I assure you, you are looking for a lot of trouble.