PageMap

The <PageMap> tag wraps one or more DataObject tags, in a Google Sitemap or the markup fo an HTML page. It encloses all PageMap information for the relevant URL.

PageMaps is a structured data format that Google created to enable website creators to embed data and notes in their webpages - support.google.com

# PageMap Tag Definitions

The following table outlines the requirements for adding PageMap data to a sitemap. All of the following tags are required:

<PageMap> <DataObject type> <attribute name>

* PageMap - encloses all PageMap information for the relevant URL. * DataObject - encloses all information about a single element (for example, an action) that should appear in the Custom Search result. * Attribute - each DataObject contains one or more attributes.

# PageMap elements

Each element (for example, an action) that you want to add to a snippet is a DataObject. Each DataObject has a number of attributes, such as a label or URL, which you can customize as you choose.

You can create any type of DataObject you like, but Google Custom Search recognizes the DataObjects listed in the following table, and will render them in search results:

The <DataObject> tag wraps a set of attributes for a single type of markup (thumbnail, action, or publication) within a <PageMap> tagged section of a PageMap.

You can add "actions" to your PageMap in order to add the ability for a user to click on a link in your search results to do things like "download a file".

# Example

Below is an example of a Sitemap that includes PageMap information for two URLs: * http://www.example.com/foo and * http://www.example.com/bar.

Specifically you can see that the following DataObject has been added to the PageMap element:

<DataObject type="document" id="hibachi"> <Attribute name="name">Dragon</Attribute> <Attribute name="review">3.5</Attribute> </DataObject>

Here is the full PageMap:

<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:content="http://www.google.com/schemas/sitemap-content/1.0"> <url> <loc>http://www.example.com/foo</loc> <PageMap xmlns="http://www.google.com/schemas/sitemap-pagemap/1.0"> <DataObject type="document" id="hibachi"> <Attribute name="name">Dragon</Attribute> <Attribute name="review">3.5</Attribute> </DataObject> </PageMap> </url> <url> <loc>http://www.example.com/bar</loc> <PageMap xmlns="http://www.google.com/schemas/sitemap-pagemap/1.0"> <DataObject type="document" id="biggreenegg"> <Attribute name="name">Ribs</Attribute> <Attribute name="review">4.0</Attribute> </DataObject> </PageMap> </url> </urlset>