Puedes transformar tu XML con una transformación XSLT:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output encoding="utf-8" indent="no" method="xml" version="1.0"/>
<xsl:param name="COMMENT"/>
<xsl:preserve-space elements="*"/>
<xsl:template match="/">
<xsl:comment>
<xsl:value-of select="$COMMENT"/>
</xsl:comment>
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:transform>
Mis mejores deseos,
Jan