Rolland, Susie (DIS) wrote: > We will be inserting items daily - this will be state press releases. > They will be available for one month. But often during the month > someone will want a release removed for various reasons. So are you > saying when I need to remove an item, I have to read the whole file > and rewrite everything except the one <item>,,,</item> I don't want?
Yes. Lots of ways to accomplish that. You could open the file with a text editor and delete the offending item. You could write an XSLT stylesheet to copy everything except the offending item. You would write a SAX filter in Perl to delete the offending item. If the rss is being generated from some database or something, perhaps you would delete the item there and regenerate the file. How are you removing the expired articles? Just some ideas... > > -----Original Message----- > From: Andres Monroy-Hernandez [mailto:[EMAIL PROTECTED] > Sent: Saturday, November 06, 2004 12:52 PM > To: Rolland, Susie (DIS) > Cc: [EMAIL PROTECTED] > Subject: Re: rss remove item > > > Hi, > > I think you might have to read the RSS file, parse it, and write only > those sections that you want. > > But if you created the RSS file, why can't you just avoid writing that > item that you want to remove? > > Regards, > -Andrés > > Susie Rolland wrote: > > Hello, > > > > I am a true Perl beginner ... I can create an rss file using > > XML::RSS and now I need a way to remove an <item> ..</item> by > > passing in the <title> value ... any help on what to read about > > would be appreciated > > > > > > Susan Rolland 902-2988 > > Department of Information Services -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>