Skip to content

Instantly share code, notes, and snippets.

@fbaligand
fbaligand / dbunit-to-sql.xsl
Last active December 15, 2015 00:49
XSLT permettant de transformer un fichier XML DBUnit en script SQL d'insertion
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="UTF-8" media-type="text/sql"/>
<xsl:template match="dataset">
<xsl:apply-templates select="./*"/>
</xsl:template>
<xsl:template match="dataset/*">
<xsl:text>insert into </xsl:text>