Question : Wordpreess Feed to XML file via PHP

I have a news scroller that is flash based and runs off of an xml file for headlines and subject lines.
I want to take the posts from our wordpress blog (via rss feed Im assuming) and convert it via PHP to the xml file format I have below. I know PHP 5 has simpleXML now, and maybe this can be utilized? Can I change the Wordpress Feed format as well to make it easier? In any case I need quickest solution please.

My feed is this format: http://blog.*notshown*.com/?feed=rss2


XML file to convert Wordpress feed to:

<data>      

      <settings>            

            <width>265</width>

            <height>370</height>

            

            <visibleItems>3</visibleItems>

            <itemWidth>260</itemWidth>

            <itemHeight>80</itemHeight>

            <itemsHSpacing>30</itemsHSpacing>

            <itemsVSpacing>30</itemsVSpacing>

            

            <arrowVSpacing>20</arrowVSpacing>

            <showArrows>true</showArrows>

            <showScrollbar>false</showScrollbar>

            <scrollbarHeight>250</scrollbarHeight>

            

            <maxBlur>32</maxBlur>

            <slideTime>0.5</slideTime>

            

            <autoPlay>true</autoPlay>

            <autoPlayDelay>3</autoPlayDelay>

            <pauseOnItemMouseOver>true</pauseOnItemMouseOver>

            

            <itemReflection>false</itemReflection>

            <reflectionAlpha>30</reflectionAlpha>

            <reflectionHeight>20</reflectionHeight>

            <reflectionDistance>0</reflectionDistance>            

      </settings>      

      <news>            

            <item>                  

                  <title><![CDATA[Solution Series Shafted Roll Stands]]></title>

                  <subTitle><![CDATA[]]></subTitle>

                  <content><![CDATA[]]></content>

                  <link>http://news.thomasnet.com/companystory/-Solution-Series-Shafted-Roll-Stands-830491/</link>

                  <linkTarget>_blank</linkTarget>

            </item>

            <item>                  

                  <title><![CDATA[Web Tension Controller optimizes product quality]]></title>

                  <subTitle><![CDATA[]]></subTitle>

                  <content><![CDATA[]]></content>

                  <link>http://www.doubleeusa.com/web_tension_control.htm/</link>

                  <linkTarget>_blank</linkTarget>

            </item>

            <item>                  

                  <title><![CDATA[Special Safety Chuck Features Accommodate All Applications]]></title>

                  <subTitle><![CDATA[]]></subTitle>

                  <content><![CDATA[]]></content>

                  <link>http://www.doubleeusa.com/safety_chucks.htm</link>

                  <linkTarget>_blank</linkTarget>

            </item>

            <item>                  

                  <title><![CDATA[Lightweight Portable Unit Saves Rolls with Crushed Cores]]></title>

                  <subTitle><![CDATA[]]></subTitle>

                  <content><![CDATA[]]></content>

                  <link>http://www.doubleeusa.com/core_restorers.htm</link>

                  <linkTarget>_blank</linkTarget>

            </item>

            <item>                  

                  <title><![CDATA[Double E Launches Espo Slitting Products]]></title>

                  <subTitle><![CDATA[]]></subTitle>

                  <content><![CDATA[]]></content>

            </item>

      <!--      <item>                  

                  <title><![CDATA[Bank of America Posts Third-Quarter Loss]]></title>

                  <subTitle><![CDATA[16.05.2008 | 16:23 AM]]></subTitle>

                  <content><![CDATA[All text is HTML formatted for maximum flexibility. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.]]></content>

                  <link>http://www.some-external-link.org/</link>

                  <linkTarget>_blank</linkTarget>

            </item>      

            <item>                  

                  <title><![CDATA[Bank of America Posts Third-Quarter Loss]]></title>

                  <subTitle><![CDATA[16.05.2008 | 16:23 AM]]></subTitle>

                  <content><![CDATA[All text is HTML formatted for maximum flexibility. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.]]></content>

                  <link>http://www.some-external-link.org/</link>

                  <linkTarget>_blank</linkTarget>

            </item>

            <item>                  

                  <title><![CDATA[Bank of America Posts Third-Quarter Loss]]></title>

                  <subTitle><![CDATA[16.05.2008 | 16:23 AM]]></subTitle>

                  <content><![CDATA[All text is HTML formatted for maximum flexibility. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.]]></content>

                  <link>http://www.some-external-link.org/</link>

                  <linkTarget>_blank</linkTarget>

            </item>

            <item>                  

                  <title><![CDATA[Bank of America Posts Third-Quarter Loss]]></title>

                  <subTitle><![CDATA[16.05.2008 | 16:23 AM]]></subTitle>

                  <content><![CDATA[All text is HTML formatted for maximum flexibility. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.]]></content>

            </item>

            <item>                  

                  <title><![CDATA[]]></title>

                  <subTitle><![CDATA[]]></subTitle>

                  <content><![CDATA[<b><i><font color="#908040">You can leave the title and/or subtitle xml fields empty to remove them. You can use mousewheel to scroll text when over an item. You can use mousewheel outside the items area to scroll horizontally</font></i></b> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.]]></content>

                  <link>http://www.some-external-link.org/</link>

                  <linkTarget>_blank</linkTarget>

            </item>

            <item>                  

                  <image width="270" height="180">images/04.jpg</image>

                  <title><![CDATA[Bank of America Posts Third-Quarter Loss]]></title>

                  <subTitle><![CDATA[16.05.2008 | 16:23 AM]]></subTitle>

                  <content><![CDATA[All text is HTML formatted for maximum flexibility. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.]]></content>

                  <link>http://www.some-external-link.org/</link>

                  <linkTarget>_blank</linkTarget>

            </item>

            <item>                  

                  <image width="120" height="180">images/05.jpg</image>

                  <title><![CDATA[Bank of America Posts Third-Quarter Loss]]></title>

                  <subTitle><![CDATA[16.05.2008 | 16:23 AM]]></subTitle>

                  <content><![CDATA[All text is HTML formatted for maximum flexibility. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.]]></content>

                  <link>http://www.some-external-link.org/</link>

                  <linkTarget>_blank</linkTarget>

            </item>      

            <item>                  

                  <image width="271" height="180">images/01.jpg</image>

                  <title><![CDATA[Bank of America Posts Third-Quarter Loss]]></title>

                  <subTitle><![CDATA[16.05.2008 | 16:23 AM]]></subTitle>

                  <content><![CDATA[All text is HTML formatted for maximum flexibility. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.]]></content>

                  <link>http://www.some-external-link.org/</link>

                  <linkTarget>_blank</linkTarget>

            </item>

            <item>                  

                  <image width="271" height="180">images/03.jpg</image>

                  <title><![CDATA[]]></title>

                  <subTitle><![CDATA[]]></subTitle>

                  <content><![CDATA[<b><i><font color="#908040">You can leave the title and/or subtitle xml fields empty to remove them. You can use mousewheel to scroll text when over an item. You can use mousewheel outside the items area to scroll horizontally</font></i></b> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.]]></content>

                  <link>http://www.some-external-link.org/</link>

                  <linkTarget>_blank</linkTarget>

            </item>

            <item>                  

                  <image width="270" height="180">images/04.jpg</image>

                  <title><![CDATA[Bank of America Posts Third-Quarter Loss]]></title>

                  <subTitle><![CDATA[16.05.2008 | 16:23 AM]]></subTitle>

                  <content><![CDATA[All text is HTML formatted for maximum flexibility. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.]]></content>

                  <link>http://www.some-external-link.org/</link>

                  <linkTarget>_blank</linkTarget>

            </item>

            <item>                  

                  <image width="120" height="180">images/05.jpg</image>

                  <title><![CDATA[Bank of America Posts Third-Quarter Loss]]></title>

                  <subTitle><![CDATA[16.05.2008 | 16:23 AM]]></subTitle>

                  <content><![CDATA[All text is HTML formatted for maximum flexibility. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.]]></content>

                  <link>http://www.some-external-link.org/</link>

                  <linkTarget>_blank</linkTarget>

            </item>      

            <item>                  

                  <image width="271" height="180">images/01.jpg</image>

                  <title><![CDATA[Bank of America Posts Third-Quarter Loss]]></title>

                  <subTitle><![CDATA[16.05.2008 | 16:23 AM]]></subTitle>

                  <content><![CDATA[All text is HTML formatted for maximum flexibility. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.]]></content>

                  <link>http://www.some-external-link.org/</link>

                  <linkTarget>_blank</linkTarget>

            </item>

            <item>                  

                  <image width="271" height="180">images/03.jpg</image>

                  <title><![CDATA[Bank of America Posts Third-Quarter Loss]]></title>

                  <subTitle><![CDATA[16.05.2008 | 16:23 AM]]></subTitle>

                  <content><![CDATA[All text is HTML formatted for maximum flexibility. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas et scelerisque ante. Phasellus hendrerit vulputate mi eget porta. Fusce at gravida diam. Etiam rutrum, erat nec volutpat mattis, enim augue laoreet.]]></content>

                  <link>http://www.some-external-link.org/</link>

                  <linkTarget>_blank</linkTarget>

            </item>-->

      </news>      

</data>

Answer : Wordpreess Feed to XML file via PHP

Random Solutions  
 
programming4us programming4us