Specifies the root element for the config.xml file.
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="string" id="string" xml:lang="string" rim:header="string" rim:userAgent="string"> </widget>
The <widget> element is the root element of the config.xml file. The config.xml file must contain a single instance of <widget>.
One.
None.
Name | Occurrences |
---|---|
zero or more |
|
one |
|
<config-file> | zero or more |
one |
|
zero or more |
|
zero or more |
|
one |
|
one |
|
zero or more |
|
zero or more |
None.
You can define the following attributes for this element:
Attribute | Description |
---|---|
xmlns |
Required. Defines the namespace for the HTML5 app. The value must be xmlns="http://www.w3.org/ns/widgets". If this namespace is missing, the .bar file isn't valid. |
xmlns:rim |
Required. Defines the namespace for the Cordova extensions (that is, those elements with the rim: prefix). The value must be xmlns:rim="http://www.blackberry.com/ns/widgets". |
version |
Required. Specifies a valid version for the app in one of the following
formats:
|
id |
Required. Specifies a unique identifier for the app. Unless you are repackaging an app from another platform, use a reverse DNS format (e.g., id="com.somedomain.HelloWorld"). |
xml:lang |
Optional. Specifies the language that is used in the element. For more information about this attribute, visit www.w3.org/TR/html401/struct/dirlang.html. |
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.0.0.1" id="com.sample.HelloWorld"> </widget>