Creating a configuration document (config.xml)

This section describes how to set up a basic configuration document file for your "Hello World" app.

A configuration document is an .xml file that contains the elements to define the WebWorks app namespace, the name of your app, any app permissions, the start page, and the icons to use for your app. This file also contains any elements you require in order to define general information that's specific to your app, such as the author's name and a description.

The valid file name for a configuration document for a WebWorks app is config.xml, and it's not case sensitive. Within your app's archive, the configuration document must use this file name, and the file must exist in the root folder of the app's archive.

The configuration document contains the widget element at its root. The widget element provides a container for all other elements. For a detailed description about the elements that you can use in your configuration document, see HTML5 WebWorks Developer site.

To set up the configuration document for the "Hello World" app:
  1. Earlier you created a directory called HelloWorld such that the URL http://localhost/HelloWorld will resolve to that directory. Now, in your HelloWorld directory, using your preferred XML editor,create a file called config.xml in the root of the HelloWorld directory. This file is required to package your app for the QNX CAR app platform.
  2. Insert the content below into your config.xml file.
    <?xml version="1.0" encoding="UTF-8"?>   
    <widget xmlns=""           
            version="" id="MyHelloWorldApp" xml:lang="en">
         <author>My Name</author>
         <name>Hello World</name>
         <description>An HTML5 example app</description>
         <content src="index.html"/>   

    The elements used for this "Hello World" app are described as follows:

    A container element for all other elements in this app. The widget element is the root element that defines:
    • The namespace for your "Hello World" BlackBerry WebWorks app (required).
    • The namespace for your app extensions (include this if you are referring to specific extensions).
    • The version number and ID of the app (required).
    The name of the author to associate with the app.
    A human-readable name for the app that is displayed when the app is viewed on the home screen of the device.
    A human-readable description to describe this app. This description is displayed in the app's listing, under Options.
    The name of the file used for the "Hello World" app start page.

    This entry point for your app must be called index.html.

    A detailed description about the elements that you can use in the configuration file is available on the HTML5 WebWorks Developer site.


    In order to use any of the APIs for QNX CAR, you must add the corresponding feature ID (an element used to specify features and functionality that the app can access) to the config.xml file.

Next, you'll set up a file named index.xml, which is the main entry point for your "Hello World" app.