Limit the amount of results for a Dynamic XML datasource?
This is an open discussion with 3 replies, filed under Troubleshooting.
Search
I do this in my Show latest Last.fm plays on your Symphony site tutorial. The “Included Elements” field allows you to specify the XPath of elements to include. I’m not sure of your XML structure, but you could do something like:
//status[position() <= 2]
This will grab the first and second (less than or equal to two) status
elements.
Awesome as always, thanks nick :)
If you wanted to shave a few milliseconds off, you could also limit at the twitter API call using the count
parameter:
http://twitter.com/statuses/user_timeline.xml?count=2
edit:
Without authenticating, it would be (for ‘ashooner’):
http://twitter.com/statuses/user_timeline/ashooner.xml?count=2
Create an account or sign in to comment.
I just noticed that there doesn’t appear to be an option to limit the results returned from a Dynamic XML datasource. I was hoping to cut the amount of twitter entries shown down to 2, any ideas?
I’m assuming it’s easiest to just write it in XSL, but I’m not quite sure how to do that.