XML : Get first n entries from rss or atom feed using YQL and feednormalizer

I'm using YQL to retrieve RSS and ATOM feeds as JSON, and normalize them to ATOM style using the feednormalizer table.

select * from feednormalizer where output='atom_1.0' AND url='http://feeds.delicious.com/v2/rss/msuweb'

I need to get only the first X entries. I know that, in theory, an xpath expression should be able to do that. However, when I try one that I assume ought to work...

select * from feednormalizer where output='atom_1.0' AND url='http://feeds.delicious.com/v2/rss/msuweb' AND xpath='//entry[count(preceding::entry) < 5]'

...the results object comes back null. I've also tried using item instead of entry, since that's what an RSS feed will have in the actual XML. That also returns a null results object.

No comments:

Post a Comment