Converting RSS to Applets with RSSViewerApplet


Here's a cool oneRSSViewerApplet (www.webreference.com/cgi-bin/xml/rssappletconfig.pl). This package displays RSS feeds in a Java applet in your Web page. Applets are bits of Java-powered code that work in browsers and display their results in a section of a Web page.

Select the RSS source you want to read from, choose and configure the colors you want for your feed, and click the Preview button (Figure 9.31). You'll see a preview of the applet, and a box containing the applet's code.

Figure 9.31. RSSViewerApplet lets you select colors for your feed.


Just copy the applet code and place it in a Web page of your own, like this:

    <html>      <head>        <title>Using RSSViewerApplet</title>      </head>            <body>        <h1>Using RSSViewerApplet</h1>        <APPLET code=com.exploringxml.rss.applet.RSSViewerApplet.class        archive=http://www.webreference.com/xml/rssApplet.jar        codebase=http://www.webreference.com/ width=300 height=300>          <PARAM name=src            value=http://www.webreference.com/webreference.rdf>          <PARAM name=title.font.family value=sansserif>          <PARAM name=title.font.size value=10>          <PARAM name=title.font.style value=bold>          <PARAM name=item.font.family value=sansserif>          <PARAM name=item.font.size value=10>          <PARAM name=item.font.style value=bold>        </APPLET>      </body>    </html> 


The applet displays the WebReference news (www.webreference.com) RSS feed (Figure 9.32).

Figure 9.32. RSSViewerApplet is at work displaying a news feed.




Secrets of RSS
Secrets of RSS
ISBN: 0321426223
EAN: 2147483647
Year: 2004
Pages: 110

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net