This article describes how to do it.
I had a need to view the raw XML being generated from a Content Query Web Part today, so I could see exactly what data was being
returned in each column. This is how to do it. The
PublishingResources feature of MOSS2007 contains a file entitled
ContentQueryMain.xsl, which is the primary stylesheet for the webpart.
Make sure you take a backup of that file before continuing! Open the
file, and near the top is the following line: <xsl:output
method="html" indent="no" />
Replace that line with the following:
<xsl:output method="xml" indent="yes" />
Then scroll down a few lines and find the following snippet:
<xsl:template match="/">
<xsl:call-template name="OuterTemplate" />
</xsl:template>
Replace this with
<xsl:template match="/">
<xmp><xsl:copy-of select="*" /></xmp>
</xsl:template>
Save the file, IISReset, and that’s it! You can now see all the data returned by the Content Query Web Part in its
native XML form, and see exactly what values are contained within each
field.