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.

Advertisements
Leave a comment

3 Comments

  1. Thanks for the article
    Regards
    James
    http://www.tilogeo.com

    Reply
  2. On the content query web part, I can use for example the itemstyle.xsl file in the xsl style sheet library and add my own templates. But, I think what you have here is a complete XSL file that you are suggesting applying. I don’t see how to use another file when the templates available are for itemstyle and I can pull my templates out of the itemstyle file.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: