...
Module - This is the root element of the XML structure.
ModulePrefs - This is the a gadget configuration element. This can contain attributes and child elements as follows:. For example,
Code Block title Example <ModulePrefs title="Population History" height="350" description="Subscribe to the state channel" tags="drilldown"> <Require feature="dynamic-height" /> <Require feature="pubsub-2" /> </ModulePrefs>
The
Require
element is used to define features that are used in the gadget. In this sample, thepubsub-2
anddynamic-height
features have been added.Content - This contains the data that needs to be rendered. In the following example, it contains HTML. When defining the content element, you need to also define the type of the content.
Code Block <Content type=”html”> <![CDATA[ html content goes here ]]> </Content>
For example, if you look at theindex.xml
file in the Line Chart gadget sample, which is in the<DS_HOME>/samples/s0/gadgets/usa-population-history
directory you can see that the HTML content is normal HTML content where we load scripts, styles and define HTML elements to load visual contents. The main purpose of this file is to load thePubSub-2
feature using theRequire
element.
...