From dan at linder.org Mon Feb 1 20:30:21 2010 From: dan at linder.org (Dan Linder) Date: Mon, 1 Feb 2010 22:30:21 -0600 Subject: [Omaha.pm] [OT] Parsing XML with command line XSLT xsltproc... Message-ID: <3e2be51002012030x78931cd7ne7e50ed2b28b29c5@mail.gmail.com> 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? Once I get that, it's fairly easy to use mp3info2 to fix the internal MP3 fields so my player shows usable information. On a side note, this site was a good primer on XSL: * http://accu.org/index.php/journals/311 Any others that people have found helpful? Thanks, Dan === begin parse.xsl === === end parse.xsl === -- ***************** ************* *********** ******* ***** *** ** "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* ***************** From sterling at hanenkamp.com Mon Feb 1 21:33:49 2010 From: sterling at hanenkamp.com (Sterling Hanenkamp) Date: Mon, 1 Feb 2010 23:33:49 -0600 Subject: [Omaha.pm] [OT] Parsing XML with command line XSLT xsltproc... In-Reply-To: <3e2be51002012030x78931cd7ne7e50ed2b28b29c5@mail.gmail.com> References: <3e2be51002012030x78931cd7ne7e50ed2b28b29c5@mail.gmail.com> Message-ID: On Mon, Feb 1, 2010 at 10:30 PM, Dan Linder 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: From evaddnomaid at gmail.com Tue Feb 2 06:14:19 2010 From: evaddnomaid at gmail.com (Dave Burchell) Date: Tue, 2 Feb 2010 08:14:19 -0600 Subject: [Omaha.pm] [OT] Parsing XML with command line XSLT xsltproc... In-Reply-To: <3e2be51002012030x78931cd7ne7e50ed2b28b29c5@mail.gmail.com> References: <3e2be51002012030x78931cd7ne7e50ed2b28b29c5@mail.gmail.com> Message-ID: <6e25cf311002020614t2a125642kd8447323cdcc3dcf@mail.gmail.com> Maybe try changing