XSLT XML Dump

Ever wanted to dump the raw XML from a webpart? It’s easy. Just change the XSLT to the following for nicely formatted XML.

<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”&gt;
<xsl:output method=”xml” indent=”yes” />
<xsl:template match=”/”>
<xmp>
<xsl:copy-of select=”*”/>
</xmp>
</xsl:template>
</xsl:stylesheet>

You can save this as an style sheet in your styles library and apply it to any web parts that allow that to get a dump of the raw xml.