Life, OPML Support, Software

Kickin’ It, OPML Style

As much as I love XML files and the way that browsers display them with their little plus and minus toggles, a file is no good to me unless I can read and utilize the data it contains. So while OPML is great for storing link and feed data, I can’t really navigate an OPML file the same way I could a browser-generated quasi-HTML bookmarks file.

Thinking that someone else had to have run up against this problem by now, I was somewhat surprised when I couldn’t find any easily-accessible XSLT for transforming OPML to HTML; there was one page that everyone was linking to, but it is apparently MIA. There was also a page that dealt with creating an HTML blogroll from an OPML file, but I wanted something that would handle nested folders, HTML links, and RSS feeds.

So keeping that in mind, I present for your approval a stylesheet for transforming OPML files into cleanly presented lists of links and feeds (in HTML). My bookmarks are an example of a transformed file; the only change needed was to add the reference to the stylesheet at the top of the OPML file. So check it out, but don’t pay any attention to the folders full of Care Bears links. Those are for some, uh, research I’m doing…

Standard

8 comments on “Kickin’ It, OPML Style

  1. venkatramanan says:

    Chris

    Thanks for the tool.
    I followed your instructions with the OPML imported from Google reader. It almost worked. wait. Here’s the error I found. All my subscriptions were shown in the following format:

    Name of the blog
    http://feeds.feedburner.com/ChangethisNewsletter – But here’s the issue – The link for the URL is http://www.chrisfinke.com/files/%7B@xmlUrl%7D which takes me to http://www.chrisfinke.com/

    Kindly fix this issue. I have sent my OPML to you by mail.

    Regards
    Venkatramanan

  2. Hi Chris, that’s awesome. I was just thinking about writing a program in Python to parse the OPML into html, but the nagging sensation that XSL was the Right (and obvious) tool made me google a bit harder, and led me to your stylesheet. Fantastic.

    By the way, if anybody has the problem that Venkatramanan has, above, where all links are to chrisfinke.com, the solution is to copy the stylesheet locally, and refer to it as the instructions (comment #2) indicate, not as http://chrisfinke.com/style/opml.xsl. I suspect that will solve your problem.

Leave a Reply to Ahmed Cancel reply

Your email address will not be published. Required fields are marked *