Search — April 21, 2009 9:59 pm

Getting raw XML from search results

Posted by

In order to play around with search results, for instance making changes to the XLS with SharePoint Designer, you need to have the raw search results XML available.

To get this its quite easy, simply paste the following into the XSL Editor property of a Search Core Results web part:

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

Just follow the steps below to make it happen:

  1. Edit search results page, modify “Search Core Results” webpart
  2. Click on XSL Editor button under “Data View Properties”.
  3. Replace the XSL with above XSL snippet.
  4. Save the page.
  5. Re-run the query
  6. Copy the generated XML and paste into a file called SearchResults.xml which can then be imported into SharePoint through SharePoint Designer and then the resulting XLS altered.
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

  • Share this post:
  • Facebook
  • Twitter
  • Delicious
  • Digg

Leave a Reply

— required *

— required *