How to sort an OPML file
I once sent an email to Aaron Skonnard asking him for help
on how to sort an OPML file, which is an XML file in fact,
but received no reply so far. Maybe he is a busy person or
maybe my question was too dumb to answer. Anyway, today I
found out how to sort the OPML file I export through RSS
Bandit. I enclosed below the XSLT sheet I created, just for
appreciation. Any comment is welcome.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<opml version="1.0">
<head/>
<body>
<xsl:for-each select="opml/body/outline">
<xsl:sort select="@title"/>
<outline title="{@title}">
<xsl:for-each select="outline">
<xsl:sort select="@title"/>
<outline title="{@title}" xmlUrl="{@xmlUrl}"
htmlUrl="{@htmlUrl}" description="{@description}"/>
</xsl:for-each>
</outline>
</xsl:for-each>
</body>
</opml>
</xsl:template>
</xsl:stylesheet>
My OPML file can be found at http://www.geocities.com/guercheLE/weblogs_asp_net/myfeeds.opml