From Opera 15 onward, Opera 11 & 12’s extension format is no longer supported, and instead, we’ve switched to Chromium’s extension model. Check out our new documentation for developing extensions for Opera 15 and higher and start building your own extensions.
- The container element under which the rest of the elements of the config.xml file go.
- Provides the name of the extension.
- Provides a description of what the extension is supposed to do.
- Provides details of the author of the extension.
- Provides the software license of the extensions.
- Specifies a custom icon file for the extension.
- Defines a custom start file for the extension.
- Declares the use of certain features by the extension, such as being able to display content in speed dial.
- Allows for preferences to be declared by the developer. They are stored as key-value pairs and accessible from within the extension using
- Allows authors to give their extension permission to access external web resources.
- Serves as a wrapper for text content, usually for the purpose of internationalization.
- Specifies the language of the contained text in the element.
- Defines the direction of the language used by an element with the following values:
The mandatory config.xml file gives the Opera browser relevant information about an Opera extension, such as the name, description and version.
Most of the information in this file (information such as the name, description, author name of the extension, etc.) is also useful to the end user as it is shown in various places in Opera's user interface.
A well-formed config.xml file is mandatory for every Opera extension.
For full documentation on config.xml, see the:
Below is an example config.xml file including the usual meta elements like
description. It also contains the following two useful elements:
- Since this extension is showing the latest news from the Choose Opera blog inside Speed Dial, it declares that it will use the "opera:speeddial" feature.
- It will fetch the latest news from http://my.opera.com and is therefore using the
accesselement to request access to share and get information from this domain.
<?xml version="1.0" encoding="utf-8"?> <widget xmlns="http://www.w3.org/ns/widgets" id="http://my.opera.com/chooseopera/xml/rss/blog/" viewmodes="minimized" version="1.0"> <name>Opera news</name> <author>John Smith</author> <description>Stay up to date with the latest news from Opera, served to you inside Speed Dial</description> <icon src="images/icon.64x64.png"/> <feature name="opera:speeddial" required="true"> <param name="url" value="http://my.opera.com/chooseopera/blog/"/> </feature> <access origin="http://my.opera.com/" subdomains="true"/> </widget>
Figure 1 shows the extension manager where the details for the extension have been taken from the config.xml file above.
As the markup example shows, much of the information written in the config.xml file helps the user ascertain various details about the extension. The following sections on this page will look at the elements and attributes to keep in mind when marking up the config.xml file.
Read the Dev.Opera article The ins and outs of config.xml for further details regarding the config.xml file.
This article is licensed under a Creative Commons Attribution 3.0 Unported license.