Sign in

OpenSocial Dev App

Export XML Tab

< Data Viewer Tab Index  

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.

  1. Here is the list of XML specs that you have saved.
  2. Press the "Load" button to load the currently selected XML spec.
  3. Press the "Save XML spec as" button to save the current contents of the export form.
  4. Fields in the form correspond with the structure of the gadget XML specification.
  1. 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.
  1. You may specify Preload elements using the "Add a preload element" button.
  2. Once you have added a Preload, enter its URL in the long textbox.
  3. Choose the type of authentication in the Preload.
  4. 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.

  1. Click the "Add a view" button to add another content section.
  2. You can switch between content sections by clicking the name of its section in this row of tabs.
  3. If you want to change the name of the current view, edit the value in this field.
  4. 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.
  5. 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.
  1. When you are ready to export the contents of this form, press the "Export" button.
  2. 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.
< Data Viewer Tab Index