Share via


How to: View Search Results XML Data

The search component returns the search results to the requesting page as XML data. The Search Results Web Part then determines how to display these results, based on the Web Part’s display properties, and the XSLT Transformation (XSLT) specified in that Web Part's XSL property.

You can modify the search results view by modifying the XSL transform code for a particular Web Part, but to do this, you should be familiar with the structure of the Search Results Web Part XML data.

This topic shows how to modify the XSL transform code for the Search Results Web Part to display the raw XML containing the search results data. Then you can display the search result XML data for all instances of the CoreSearchResults Web Part.

The following table lists the instances of this Web Part that appear on the default results page, and the corresponding result type for each instance of the Web Part.

Table 1. CoreSearchResults Web Part instances

Web Part instance name Result type

Search Core Results

Relevant results

Search High Confidence Results [1]

High confidence results

Search High Confidence Results [2]

Keywords and best bets

To modify the Web Part's XSL property

  1. Open the Text Entry window for the XSL property using the steps described in How to: View and Edit the Search Results XSLT Transformation.

  2. Replace the default XSLT with the following:

    <?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"/>
    <xsl:template match="/">
    <xsl:copy-of select="*"/>
    </xsl:template>
    </xsl:stylesheet>
    

    This XSLT does not perform any actual transformation, so the search results will display the raw XML data.

  3. Click OK or Apply to save the changes to the Web Part.

    The search results are rendered again without the formatting provided by the XSLT.

To view the Search Results Web Part XML data

  1. Right-click the page zone that contains the Search Results Web Part that you want to view the search results XML data for, and then click View Source on the pop-up menu.

    This opens a page in Notepad that contains the HTML source.

  2. On the Edit menu, click Find, and then search for the following string:

    <All_Results>
    

    This is the opening tag for the section that contains the full search results set for the Web Part you modified.

See Also

Tasks

How to: View and Edit the Search Results XSLT Transformation
How to: Change the Properties Returned in the Core Search Results

Concepts

Customizing Enterprise Search Results