« Documentation Home

config.xml

This documentation relates to Opera's now deprecated .oex Extension API framework for Opera versions <= 12.15 and also provided by our OEX2NEX shim library.

For the latest Opera Extensions API documentation for Opera versions > 12.15 please consult the latest Opera Extensions API documentation online.

widget element
The container element under which the rest of the elements of the config.xml file go.
name element
Provides the name of the extension.
description element
Provides a description of what the extension is supposed to do.
author element
Provides details of the author of the extension.
license element
Provides the software license of the extensions.
icon element
Specifies a custom icon file for the extension.
content element
Defines a custom start file for the extension.
feature element
Declares the use of certain features by the extension, such as being able to display content in speed dial.
preference element
Allows for preferences to be declared by the developer. They are stored as key-value pairs and accessible from within the extension using widget.preferences.
access element
Allows authors to give their extension permission to access external web resources.
span element
Serves as a wrapper for text content, usually for the purpose of internationalization.
xml:lang attribute
Specifies the language of the contained text in the element.
dir attribute
Defines the direction of the language used by an element with the following values:

Overview

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:

Example

Below is an example config.xml file including the usual meta elements like name, author and description. It also contains the following two useful elements:

<feature> element
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.
<access> element
It will fetch the latest news from http://my.opera.com and is therefore using the access element 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>

Extension details taken from the config.xml file.

Figure 1: Extension details taken from the config.xml file.

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.

Further reading

Read the Dev.Opera article The ins and outs of config.xml for further details regarding the config.xml file.