Search Core Results Web Part – How to view raw XML

Sometimes when working with the Search Core Results web part within SharePoint it may be useful to see all of the XML that is being returned to the XSL stylesheet.

It is possible to see the raw XML by replacing the XSL stylesheet with the following XSL (be sure to back-up the existing stylesheet first, if it has been modified):

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

This can be modified by editing the Search Core Results web part properties.  The XSL Editor is listed under the Display Properties heading.

Search Core Results web part screen shot

Search Core Results web part screen shot

These MSDN links may be useful for further information:
How to: View Search Results XML Data
How to: Change the Properties Returned in the Core Search Results

Advertisements
This entry was posted in MOSS, SharePoint, SharePoint 2010, Web Part and tagged , , , . Bookmark the permalink.

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