Categories
Software and Programming

Silly XML hack, take 2

In a previous entry, I posted two tiny scripts for reading out a list of RSS subscriptions in an OPML file. One used regexps, and the other used the handy XML::Simple module.

Now, they both sort-of work OK, until they run into an OPML file that’s actually an outline (like the ones produced by SharpReader), where the XML::Simple script runs into a problem (the RegExp script, ironically, will probably print things OK, because it ignores the nesting and just parses whatever lines it sees).

So I did a few improvements, and here’s the result (available in plain text Perl, or SciTe syntax-highlighted HTML)