Restructure XML File using XSLT or PHP script

kimhornet

New Member
I have an iphone app which parses standard rss feeds and displays it on a table.However I have been given a feed from a client but the parser in the app cannot pickup the nodes and parse the data as it is not a standard rss feed.The layout they have given me is the following:\[code\] <rss version="0.92"> <channel> <title>Feed</title> <link>http://google.com</link> <description> Description here </description> <lastBuildDate>30 June +0100</lastBuildDate> <language>en</language> <event> <eventID>123</eventID> <name>Name here</name> <date>2012-06-29</date> <time>21:00</time> <category>Arts</category> <info> Info here </info> </event> <event> <eventID>223</eventID> <name>Name here</name> <date>2012-06-30</date> <time>22:00</time> <category>Dance</category> <info> Info here </info> </event> </channel></rss>\[/code\]Is there any way to restructure this xml file to a standard rss feed layout using XSLT or a PHP script?A standard rss feed layout being the following:\[code\]<rss> <channel> <item> <title> <![CDATA[ Title here ]]> </title> <link> http://www.theatre.com/ </link> <guid> http://www.theatre.com </guid> <description> <p> Description </p> </description> <dc:subject> <![CDATA[ ]]> </dc:subject> <dc:date>2013-02-01T18:00:04+00:00</dc:date> </item> </channel></rss>\[/code\]
 
Back
Top