Sign up for the Google AJAX Feed API
using the URL http://code.google.com/apis/ajaxfeeds/signup.html. as
shown in Fig. 9.2. Click on the Generate API Key button to generate the
API key. You would need to be logged in to your Google user account to
generate an API key. The generated Google AJAX Feed API key may be
used with all the URLs in the directory
http://127.0.0.1:8988/RSSAjax-RSSAjax-contextroot/.
186 9 RSS Feed with Ajax
Fig. 9.2 Generating Google Feed API key
9.4 Receiving a RSS Feed
In this section we shall generate a JavaScript application to download and
display JDeveloper RSS feed.. First, obtain the URL for the JDeveloper
RSS feed from
http://www.oracle.com/technology/products/jdev/temp/whatisrss.html.
The URL for the JDeveloper RSS feed is
http://www.oracle.com/technology/products/jdev/jde
veloper_news.xml. First, to access a Feed with the Google AJAX
Feed API we need to add the following script element, which specifies
the Google AJAX Feed API key, to the JavaScript application
RSSAjax.html.
The script tag loads the google.load function that is required to
load individual Google APIs. Download version 1 of the feeds API.
google.load(???feeds???, ???1???);
9.4 Receiving a RSS Feed 187
Create a JavaScript function initialize and specify the function to be
invoked when the Google Feed API has loaded.
Pages:
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170