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.
- In the Search Center choose Site Actions | Create Page.
Create a new Search Results page and call it XMLResults.aspx
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.
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="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
- Click OK to save your changes.
- Add a tab for your new page by clicking the "Add new tab" link under the tab strip.
Complete the form with a Tab Name of XML, Page of xmlresults.aspx.
- Choose OK and return to the XMLResults page. Publish the XMLResults page.
Execute a query that returns results and you should see something like the following: