XML Search Suggestions Format Specification
Windows Internet Explorer 8 search suggestions are a service that search providers can support which allow the user to receive suggestions for a search query. XML suggestions from a search provider can support text suggestions or visual suggestions.
This document covers the minimum properties necessary to enable a client to consume XML suggestions. More information on search provider extensivibility can be found by reading this article: Search Provider Extensibility in Internet Explorer. This topic discusses the following subjects:
- Search Suggestions Format
- SearchSuggestion element
- Query element
- Section element
- title attribute
- Item element
- Text element
- Url element
- Description element
- Image element
- source attribute
- alt attribute
- width attribute
- height attribute
- align attribute
- Separator element
- title attribute
- Extensibility
- Licensing Information
- Revisions
- Related topics
Search Suggestions Format
The search suggestions format describe the core set of properties needed in a search suggestion. The code snippet below shows how elements and attributes may be use to send XML suggestions.
<?xml version="1.0"?>
<SearchSuggestion xmlns ="https://schemas.microsoft.com/Search/2008/suggestions">
<Query>xbox</Query>
<Section>
<Separator title="My Visual Suggestions"/>
<Item>
<Text>Xbox 360 Live Games</Text>
<Image source="http://www.example.com/live.jpg" alt="Xbox 360 Live Games" width="75" height="75"/>
</Item>
<Item>
<Description>Game console systems and packages at a great deal.</Description>
<Image source="http://www.example.com/xboxconsole.jpg" alt="Xbox 360 Consoles" width="75" height="75"/>
<Url>http://www.example.com/games.aspx?q="Xbox 360"</Url>
</Item>
<Separator title="My Text Suggestions"/>
<Item>
<Text>Xbox 360</Text>
</Item>
<Item>
<Text>Xbox cheats</Text>
<Description>Codes and walkthroughs</Description>
</Item>
<Item>
<Text>Xbox 360 games</Text>
<Description>Games and accessories</Description>
<Url>http://www.example.com/games</Url>
</Item>
<Separator />
<Item>
<Text>xbox 360 lowest price</Text>
</Item>
<Item>
<Text>xbox 360 news</Text>
</Item>
</Section>
</SearchSuggestion>
SearchSuggestion element
The root node of the search suggestion document.
Parent: None
Requirements: The element must appear exactly once as the root node of the document.
Query element
Contains the query that was requested by the client.
Parent: SearchSuggestion
Requirements: There must be one instance of this element
Section element
Contains the set of search suggestion items for the given query.
Parent: SearchSuggestion
Requirements: There may be one instance of this element.
title attribute
Contains title that should be used with these search suggestions.
Requirements: There may be one instance of this attribute.
Item element
Contains the information necessary for a single search suggestion.
Parent: Section
Requirements:
- There may be one or more instances of this element.
- All items must contain either the Text element or the Url element or both.
Text element
The text suggestion for the given query string. This value is used to determine what search should be issued if this suggestion is selected, except in the case that the item also contains an Url element.
Parent: Item
Requirements: There may be one instance of this element.
Url element
Contains the target URL when the suggested item is selected.
Parent: Item
Requirements: There may be one instance of this element.
Description element
Contains a supplemental description of this item.
Parent: Item
Requirements: There may be one instance of this element.
Image element
Contains the image related to the suggested item.
Parent: Item
Requirements: There may be one instance of this element.
<Item>
<Description>The official Xbox website from Microsoft</Description>
<Url>https://www.xbox.com/search.aspx?q="Xbox 360"</Url>
<Image source="http://www.example.com/xboxconsole.jpg" alt="Xbox 360 Consoles" width="75" height="75" align="middle"/>
</Item>
source attribute
Contains the source URL of the image.
Requirements: There must be one instance of this attribute
alt attribute
Contains the alternate text for this image.
Requirements: There may be one instance of this attribute.
width attribute
Contains width of the image in pixels.
Requirements: There may be one instance of this attribute.
height attribute
Contains height of the image in pixels.
Requirements: There may be one instance of this attribute.
align attribute
Contains the publisher preference for how to present the image in alignment with the text.
Requirements:
- There may be one instance of this attribute.
- The value must be either "top", "middle" or "bottom"
Separator element
Indicates a new section of suggestions.
Parent: Section
Requirements: There may be one or more instances of this element.
title attribute
Contains title that should be used for this Separator.
Requirements: There may be one instance of this attribute.
Extensibility
The XML SearchSuggestion format can be extended using the W3C XML Namespace Spec convention. The XML namespace must be a unique namespace.
Licensing Information
Microsoft's copyrights in this specification are licensed under the Creative Commons Attribution-Share Alike License (version 3.0). To view a copy of this license, see http://creativecommons.org/licenses/by-sa/3.0. There is a separate patent promise called the Microsoft Open Specification Promise available to parties interested in implementing software that conforms to this specification. This patent promise is available at this location: https://www.microsoft.com/interop/osp/default.mspx.
Revisions
There are no revisions at this time.
Related topics
Reference
Conceptual
Search Provider Extensibility in Internet Explorer
Other Resources