Skip to main content

Gadget XML Schema

Module Element​

This forms the Gadget XML root element.

ModulePrefs Element​

This serves as application metadata. At least one is required as a child element of the Module element.

AttributeValueRequired
titleThe title of the applicationY

This primarily defines lifecycle events. More than one may be defined as child elements of a ModulePrefs element.

AttributeValue
relEvent type (event.addapp
hrefURL for receiving notifications on partner server = Endpoint URL
methodType of request for Endpoint URL (GET

The types of events which are designated with the rel attribute are as follows:

EventDescription
event.addappApplication installed
event.removeappApplication uninstalled
event.joingroupJoined official group for the game
event.leavegroupLeft official group for the game
event.postdiaryPosted diary entry relating to game

Require Element​

This designates an add-on function for the application in question.

AttributeValueRequired
featureSee belowY

Supported features

NameFunction
opensocial-0.8Function using OpenSocial JS API v0.8.1
flashFunction which embeds Flash content
viewsFunction which manipulates views
dynamic-heightFunction which manipulates application display sizes, etc.
tabsFunction which manipulates tabs
mbgaMobage Open Platform proprietary function

Content Element​

This describes content. At least one is required as a child element of the Module Element.

AttributeValueRequired
viewtouchY
typeurlY
hrefApplication start URLY

Output DOCTYPE Declaration​

AttributeValueRequired
quirksif true, DOCTYPE declaration is not output; if false it is output.

Examples​

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Sample Application">
<Link rel="event.addapp" href="http://www.example.com/addapp" method="POST" />
<Link rel="event.removeapp" href="http://www.example.com/removeapp" method="GET" />
<Link rel="event.joingroup" href="http://www.example.com/joingroup" method="GET" />
<Link rel="event.leavegroup" href="http://www.example.com/leavegroup" method="GET" />
<Link rel="event.postdiary" href="http://www.example.com/postdiary" method="GET" />
</ModulePrefs>
<Content view="touch" type="url" href="http://www.example.com/index.html" />
</Module>

Revision History​

  • 03/01/2013
    • Initial release.
  • Module Element
  • ModulePrefs Element
    • Link Element
  • Require Element
  • Content Element
  • Examples
  • Revision History