Skip to content

Instantly share code, notes, and snippets.

Created December 30, 2019 20:47
What would you like to do?
A simple XSLT transform to extract post dates and titles from a WordPress export file
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl=""
<xsl:output method='text' encoding='utf-8'/>
<xsl:template match="/">
<xsl:apply-templates select="/rss/channel/item[wp:post_type = 'post']"/>
<xsl:template match="/rss/channel/item">
<xsl:value-of select="wp:post_date/text()"/>
<xsl:text>: </xsl:text>
<xsl:value-of select="title/text()"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment