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

Sterling Hanenkamp sterling at hanenkamp.com
Mon Feb 1 21:33:49 PST 2010


On Mon, Feb 1, 2010 at 10:30 PM, Dan Linder <dan at 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 at hanenkamp.com
785.370.4454
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/omaha-pm/attachments/20100201/008e9542/attachment.html>


More information about the Omaha-pm mailing list