Search code examples
xmlrss2

Limit Large XML feeds results and description length


I'm using an XML RSS 2.0 feed from a third party site, to import news to an iPhone application. It all works fine however the RSS feed isn't very helpful for the user, as they have huge descriptions, and the feed dates back to over a year ago. Suffice to say, the mobile network doesn't like it.

I've been looking for a way to reduce this, and before with XML feeds I would usually add a URL parameter like ?limit=10 and so on and so forth. I'm guessing this was due to wordpress/twitter etc having an API to help me out?

I'm about to write my own online parser which will format the 3rd party XML file, and then pass it back all nice and formatted with this extensions, but before that is there a really trivial way of doing this that I've somehow missed during my research?

Thanks! rocky

edit - sorry here the RSS feed for reference http://www.nexus.org.uk/news.xml


Solution

  • Found a neat little tool from Yahoo. Yahoo Pipes. I'm able to drop XML into the pipe, and then choose to render it via JSON, where I can use the "count":10 to reduce the feed, doing tests the file seems to be around 40kb. Which is much better than 794kb it use to send down.

    It still doesn't limit the description, but I can live with that.