Monday, December 8, 2008

Display search xml output

Scenario:
You want to see the search results xml output
Solution:
Use the following xslt for the search web-part, this will output the raw xml output.
Code:

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

0 comments: