Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    XML::RSS::JavaScript 0.61

    Download button

    No screenshots available
    Downloads: 722  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Brian Cassidy and Ed Summers | More programs
    Perl Artistic License / FREE
    March 4th, 2008, 12:48 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    XML::RSS::JavaScript description

    XML::RSS::JavaScript can serialize your RSS as JavaScript.

    XML::RSS::JavaScript can serialize your RSS as JavaScript.

    SYNOPSIS

    use XML::RSS::JavaScript;
    my $rss = XML::RSS::JavaScript->new();
    $rss->channel(
    title => 'My Channel',
    link => 'http://my.url.com',
    description => 'My RSS Feed.'
    );

    $rss->add_item(
    title => 'My item #1',
    link => 'http://my.item.com#1',
    description => 'My first news item.'
    );

    $rss->add_item(
    title => 'My item #2',
    link => 'http://my.item.com#2',
    description => 'My second news item.'
    );

    # save rss
    $rss->save( '/usr/local/apache/htdocs/myfeed.xml' );

    # save identical content as javascript
    $rss->save_javascript( '/usr/local/apache/htdocs/myfeed.js');

    Perhaps you use XML::RSS to generate RSS for consumption by RSS parsers. Perhaps you also get requests for how to use the RSS feed by people who have no idea how to parse XML, or write Perl programs for that matter.

    Enter XML::RSS::JavaScript, a simple subclass of XML::RSS which writes your RSS feed as a sequence of JavaScript print statements. This means you can then write the JavaScript to disk, and a users HTML can simply include it like so:

    < script language="JavaScript" src="/myfeed.js" >< /script >

    What's more the javascript emits HTML that can be fully styled with CSS. See the CSS examples included with the distribution in the css directory.

    < html >
    < head >
    < link rel="stylesheet" type="text/css" href="/css/rollover1.css" >
    < /head >
    < body >
    Your content here...
    < script language="JavaScript" src="http://my.feed.com//myfeed.js" >< /script >
    < /body >
    < /html >

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    serialize RSS | RSS to JavaScript | Perl module | serialize | RSS | JavaScript

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM