Core results web part: Raw XML property and result

I have come across situations while working with the core results web part xslt to display the results, I just want to see what property is retrieving what value. Raw xml is the best way forward!

Edit the core results web part, expand Display Properties, select the XSL Editor button. Inside the text box, copy the existing xslt out of the editor and paste the following into it:

<?xml version=”1.0″ encoding=”utf-8″?>

<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/xsl/transform”&gt;

<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>

Click OK and save the page.

Reload the page and the Raw XML will be displayed for search results!

Handy xsl 🙂

 

 

 

Advertisements