The OpenSocial Gadget XML Specification
While Shindig and Partuza are tools for building an OpenSocial container, the gadget XML specification is a tool for building application gadgets to run within a container. This XML specification file contains a series of configuration settings and data that allows the container to load the application content and information.
A gadget XML file contains a few main nodes (or elements). The
root Module node contains
three child nodes, ModulePrefs, UserPref, and a series of Content nodes. ModulePrefsk
defines the characteristics (metadata) about the application,
UserPref allows gadgets to define
user-specific data, and the Content
nodes contain the code for the gadget views.
This is the standard format of a gadget XML file:
<?xml version="1.0" encoding="utf-8"?>
<Module>
<ModulePrefs ... />
<UserPref ... />
<Content ...>
Gadget Content
</Content>
</Module>In the sections that follow, we’ll explore the content of each node and the possible configurations for building out a gadget.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access