Skip to content

Instantly share code, notes, and snippets.

@nevstokes
Last active December 16, 2017 20:53
Show Gist options
  • Save nevstokes/892ade6d04c4037a438391f279ed2780 to your computer and use it in GitHub Desktop.
Save nevstokes/892ade6d04c4037a438391f279ed2780 to your computer and use it in GitHub Desktop.
Parse the GitHub Atom feed for a project to extract links to releases
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:output method="text"/>
<xsl:template match="/atom:feed">
<xsl:apply-templates select="atom:entry"/>
</xsl:template>
<xsl:template match="atom:entry">
<xsl:value-of select="atom:link/@href"/>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment