Skip to content

Instantly share code, notes, and snippets.

@hampelm
Created July 2, 2011 02:23
Show Gist options
  • Save hampelm/1059684 to your computer and use it in GitHub Desktop.
Save hampelm/1059684 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<Metadata>
<xsl:for-each select="records/doc">
<elt>
<xsl:for-each select="*">
<xsl:element name="{@name}">
<xsl:value-of select="text()"/>
</xsl:element>
</xsl:for-each>
</elt>
</xsl:for-each>
</Metadata>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment