Check out the Feed class' .setNumEntries method. Call 
feed.setNumEntries(number) before you call feed.load, and you should be good to 
go.

http://code.google.com/apis/ajaxfeeds/documentation/reference.html#Feed

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
[email protected]

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!

On Apr 18, 2010, at 4:49 AM, soujiro0725 wrote:

> hi I have a question about Google Ajax Feed API, specifically about
> "results in XML"
> 
> Google Code playground provides a html + javascript code.  I tried to
> change the code to get a feed I designate but I only get FOUR results
> (four titles for this particular code given below).
> 
> Can I possibly get more results?
> 
> For example, let's say, I wish to obtain a list of photos from Picasa
> Since each folder can contain more than four photos, so the results
> must be maximal rather than a part of them (unless there is a better
> way).
> The code is below but is the exactly same as the one from "Play
> ground" (http://code.google.com/apis/ajax/playground/?
> exp=feeds#results_in_xml)
> ------------------------------------------------------
> <!--
>  copyright (c) 2009 Google inc.
> 
>  You are free to copy and use this sample.
>  License can be found here: 
> http://code.google.com/apis/ajaxsearch/faq/#license
> -->
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
> www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml";>
>  <head>
>    <meta http-equiv="content-type" content="text/html; charset=utf-8"/
>> 
>    <title>Google AJAX Search API Sample</title>
>    <script src="http://www.google.com/jsapi?
> key=ABQIAAAA1XbMiDxx_BTCY2_FkPh06RRaGTYH6UMl8mADNa0YKuWNNa8VNxQEerTAUcfkyrr6OwBovxn7TDAH5Q"></
> script>
>    <script type="text/javascript">
>    /*
>    *  How to receive results in XML.
>    */
> 
>    google.load("feeds", "1");
> 
>    // Our callback function, for when a feed is loaded.
>    function feedLoaded(result) {
>      if (!result.error) {
>        // Get and clear our content div.
>        var content = document.getElementById('content');
>        content.innerHTML = '';
> 
>        // Get all items returned.
>        var items = result.xmlDocument.getElementsByTagName('item');
>        // Loop through our items
>        for (var i = 0; i < items.length; i++) {
>          var item = items[i];
> 
>          // Get the title from the element.  firstChild is the text
> node containing
>          // the title, and nodeValue returns the value of it.
>          var title = item.getElementsByTagName('title')
> [0].firstChild.nodeValue;
> 
>          content.appendChild(document.createTextNode(title)); //
> Append the title to the page
>          content.appendChild(document.createElement('br')); // Add a
> new line
>        }
>      }
>    }
> 
>    function OnLoad() {
>      // Create a feed instance that will grab Digg's feed.
>      var feed = new google.feeds.Feed("http://www.digg.com/rss/
> index.xml");
> 
>      // Request the results in XML
>      feed.setResultFormat(google.feeds.Feed.XML_FORMAT);
> 
>      // Calling load sends the request off.  It requires a callback
> function.
>      feed.load(feedLoaded);
>    }
> 
>    google.setOnLoadCallback(OnLoad);
>    </script>
>  </head>
>  <body style="font-family: Arial;border: 0 none;">
>    <div id="content">Loading...</div>
>  </body>
> </html>
> ​
> ---------------------------------------------------------------------------
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google AJAX APIs" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-ajax-search-api?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-ajax-search-api?hl=en.

Reply via email to