Create a XML Test Page for Search Results

I have been working on a couple search projects lately and have found it very helpful to create a XML Results page in my Search Center.

It is easy enough to do.

  1. In the Search Center choose Site Actions | Create Page.
  2. Create a new Search Results page and call it XMLResults.aspx

  3. Once the page is created, set the "Target search results page URL" property of the Search Box to "xmlresults.aspx". This will direct any new queries from the XMLResults page back to the page, rather than the default Results page.

  4. Edit the Search Core Results Web part and remove all of the XSL and replace it with the text from this MSDN Article.

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/">
    <xmp><xsl:copy-of select="*"/></xmp>

  5. Click OK to save your changes.
  6. Add a tab for your new page by clicking the "Add new tab" link under the tab strip.
  7. Complete the form with a Tab Name of XML, Page of xmlresults.aspx.

  8. Choose OK and return to the XMLResults page. Publish the XMLResults page.
  9. Execute a query that returns results and you should see something like the following:


  1. Kindler Chase August 21, 2009
  2. Michael November 21, 2009

Leave a Reply


We use cookies to ensure the best possible experience on our website. Detailed information on the use of cookies on this site is provided in our Privacy and Cookie Policy. Further instruction on how to disable our cookies can be found there.