Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9217161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:34:49+00:00 2026-06-18T02:34:49+00:00

Im using a Perl sript to do a variety of automation functions and I’m

  • 0

Im using a Perl sript to do a variety of automation functions and I’m creating an RSS feed of the log output using XML::RSS. I am using RSS2.0 for the feed as the default 1.0 that XML::RSS creates was not working properly.

It seems fairly trivial to add an image to go at the top of the whole feed. But what I’d like to do is add an image (or a small thumbnail) for each item (a green tick / red cross). The RSS standard indicated that this should be accomplished with the <media:thumbnail> or <Media:content> tags, but I can’t figure out how to implement this with the XML::RSS module.

Has anyone got any ideas. My feed updater currently looks like this.

my $rss = new XML::RSS (version => '2.0');
$rss->parsefile($localFeed) or die;
pop(@{$rss->{'items'}}) if (@{$rss->{'items'}} == 15);
$rss->add_item(title => "$_[0]",
    description  => "$_[1]",
    pubDate => "$dtString",
    mode  => 'insert'
);
$rss->save($localFeed);

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:34:51+00:00Added an answer on June 18, 2026 at 2:34 am

    Ok, i’ll have a bash at describing how I solved it in the end. I’m not sure if this is the best way but it seems to work. I shamelessly ripped this from another internet posting, but can’t for the life of me remember where so unfortunately I can’t give credit where it is due.

    I added the “media” module using the following statement before the parse command:

    $rss->add_module(prefix=>'media', uri=>"http://search.yahoo.com/mrss");
    $rss->parsefile($myFeed) or die("could not parse feed");
    

    Now, my add item statement can contain the following syntax and XML::RSS will just add it into the feed without complaint

    $rss->add_item(
    title => "My Title",
        description  => "This describes what the item is about",
        pubDate => "2012-12-012, 13:13 GMT",
        media => {
            thumbnail => {
                width => "66",
                height => "49",
                url => "path/to/my/image.jpg",
                type => 'image/jpeg'
            }
        },
        mode  => 'insert'
    );
    

    Not forgetting the

    $rss->save($myFeed);
    

    statement. Now I just need to find a decent browser and mobile RSS reader that will actually display media:thumbnail tags as images

    Hope this helps others trying to achieve similar results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am generating new xml file using perl script but I have small problem,
how to read the multiple values from XML file using perl script? i have
My Perl script is generating an excel sheet. Output P MON #N/A XML xx
I am creating a website that is using a perl script, PHP, a MySQL
I have a string containing fully formatted XML data, created using a Perl script.
I am trying to launch MS Office through WINE using a Perl script hosted
We are using the html2ps Perl script to convert HTML to PostScript. I know
I've written a Perl script using OpenGL . It calls glutMainLoop() to let the
I have a Perl script using a system call to sort a tsv file:
I'm writing a script using Perl and Net::FTP, which is trying to upload a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.