Export XML Tab
Once you have worked with OpenSocial code in the Code Tab, you will
likely want to create an XML specification that can be installed as a
standalone app. The "Export XML" tab lets you create OpenSocial gadget
specifications easily, without needing to write XML by hand.
Just like the Code Tab, you can save and load data from the Export XML Tab.
This way, you can generate a standard sample template, and quickly export
different gadget samples using most of the same settings.
- Here is the list of XML specs that you have
saved.
- Press the "Load" button to load the currently selected
XML spec.
- Press the "Save XML spec as" button to save the current
contents of the export form.
- Fields in the form correspond with the structure of the
gadget XML specification.
- Check the box next to feature names you want to include
in your exported gadget. Once a feature is included, you may select
whether to specify the feature as required or optional.
- You may specify Preload elements using the
"Add a preload element" button.
- Once you have added a Preload, enter its URL in the
long textbox.
- Choose the type of authentication in the
Preload.
- For signed requests, you may specify whether to sign the
viewer or the owner.
The Export XML tag supports multiple views. By default, it adds a "canvas" view.
- Click the "Add a view" button to add another content
section.
- You can switch between content sections by clicking the
name of its section in this row of tabs.
- If you want to change the name of the current view,
edit the value in this field.
- If you want to use the current contents of the Code
Tab's textbox, click the "Copy from code tab" button to insert it into the
current view's content section.
- Unlike the Code Tab, the content sections in the
Export XML Tab support both HTML and JavaScript. JavaScript code must
be inserted between <script> tags, like you would in an HTML
document. For convenience, JavaScript code is highlighted in this view.
- When you are ready to export the contents of this
form, press the "Export" button.
- An overlay pops up containing the rendered XML
specification. Currently, to save this file to a web server you must copy
and paste it into a text file on your computer, then upload it manually
to your server.