I am using the following xml structure go create xml feeds on my website, where the item section is looped many times depending on the number of rows returned from the database.
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>title goes here</title>
<link>link goes here</link>
<atom:link href="url goes here" rel="self" type="application/rss+xml" />
<description>description goes here</description>
<item>
<title>title goes here</title>
<link>url goes here</link>
<guid>id goes here</guid>
<pubDate>data goes here</pubDate>
<description>description goes here</description>
</item>
</channel>
</rss>
I now have a need to use jsonp. what is the best way to structure the json data to return the above data in json form?
Here’s how I would structure it: