I’m studying Apple’s LazyTableImages sample code. I’d like to understand how the app is pulling data from the RSS feed included in the app:
http://phobos.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/toppaidapplications/limit=75/xml
How are the contents at the above url parsed? Viewing the page source reveals HTML with no apparent xml section. While looking through the sample parsing code I found a few symbols like im:name. However these symbols are not in the contents of the above url.
I tried to host the contents of the above url locally (w/ limit=1). However pointing the sample code to @"~/Desktop/a.xml" causes the application to throw the error unsupported url.
More info: While reading http://en.wikipedia.org/wiki/Rss I came across what I expected to see at phobos link above. Something like this:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>RSS Title</title>
<description>This is an example of an RSS feed</description>
<link>http://www.someexamplerssdomain.com/main.html</link>
<pubDate>Mon, 06 Sep 2009 16:45:00 +0000 </pubDate>
<item>
<title>Example entry</title>
<description>an interesting description</description>
<link>http://www.wikipedia.org/</link>
<guid>unique string per item</guid>
<pubDate>Mon, 06 Sep 2009 16:45:00 +0000 </pubDate>
</item>
</channel>
</rss>
Is there an equivalent “human-readable” xml document corresponding to the above phobos link somewhere?
You’re right, the feed you’re looking at technically isn’t an RSS Feed. It’s an Atom 1.0 Feed, but both are popular XML-based feed formats.
If you view the source of the feed you will see the XML elements you’re looking for, like:
Some browser versions parse RSS/Atom feeds into user-friendly HTML pages and present them instead of the actual feed, it sounds like that’s the type of HTML page you’re viewing.
On a OS X, you could use a command like Curl to download the feed in a Terminal: