Hi Martin and Sam,
Thanks very much for your help.
I had tried this before but it did not work because I need to mantain the structure of the xml as well with all the hierarchy.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/KmrsChart">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="*">
<xsl:if test="@*">
<xsl:for-each select="@*">
<xsl:element name="{name()}">
<xsl:value-of select="." />
</xsl:element>
</xsl:for-each>
</xsl:if>
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>