[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] [OT] Parsing XML with command line XSLT xsltproc...



On Mon, Feb 1, 2010 at 10:30 PM, Dan Linder <dan@linder.org> wrote:
I listen to quit a few podcasts, but some of their internal MP3
title/album/etc fields messed up.  My podcatcher (bashpodder -
http://lincgeek.org/bashpodder/) uses the xsltproc command line tool
to parse the RSS feed for the URLs for the MP3s.

When I try to parse an RSS feed with my XSL file (see below), I get
only the first RSS entry field:
   xsltproc parse.xsl http://leoville.tv/podcasts/sn.xml

Any idea how to modify the XSL file to work on all RSS entries?

I hope you'll forgive me, but I'm going to be annoying and not answer your question in the way that you asked. I dislike XSLT, so I'd use:

XML::RSS
XML::Twig
Or something else on CPAN

I used to do XSLT, particularly when I was mostly stuck working with Java. Then, (after cutting off my Java) I realized that if I wanted a Turing-complete template language, I already have Perl. Performance is about the same, Perl has more features, and I don't have to use XML to write code.

--
Andrew Sterling Hanenkamp
sterling@hanenkamp.com
785.370.4454