XML User Interface Language

from Wikipedia, the free encyclopedia

XML User Interface Language ( XUL ) is an XML -based description language for graphical user interfaces (GUIs). It was originally developed for the Mozilla project, but is now also used by other software. In Mozilla applications such as Firefox , Thunderbird , SeaMonkey or Netscape , the entire user interface is generated from XUL files. The Gecko rendering engine is used, which is also used to display websites .


XUL allows the separation of layout , design and code a user interface. The layout and thus the rough structure of the user interface (such as buttons , input fields and other control elements ) is defined in XUL, while the presentation (specific fonts, colors, line styles, etc.) is defined with CSS . Different themes (so-called skins ), also to simulate the appearance of different operating systems, can then be created relatively easily by changing the CSS styles.

Because XUL files are not compiled, but rather interpreted at runtime, it is also possible for users to edit and expand the user interface according to their own wishes, which in Mozilla programs can in principle also be done automatically using installable add-ons . This was possible, for example, in the Firefox browser up to version 56, since then only extensions have worked that use the more modern, but more restrictive WebExtensions format.

The creation of new interfaces in XUL is easier and less time-consuming than with many programming languages. At a port to a particular operating system - platform ported must the entire Mozilla XUL toolkit on the new platform. In return, after such porting, XUL-based programs no longer require any special adjustments, which greatly simplifies the development of applications that are independent of the operating system.

The disadvantage is that the processing and display speed is often slower than with native user interfaces due to the additional effort involved in processing the XUL files and the necessary calculations of the layout and appearance. Since the operating system-specific controls have to be simulated using CSS, there may be differences in the appearance and behavior of the user interface compared to native programs.

Structure of an XUL file

A simple XUL file could look like this:

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="sample-window"
        <checkbox label="CheckBox"/>
            <spacer flex="1"/>
            <button label="OK"/>
            <button label="Abbrechen"/>
Representation in Mozilla Firefox

XUL-based applications

References on Ghostbusters

The acronym XUL has its origins in the movie Ghostbusters , in which the demigod spirit, who has taken possession of Dana Barrett, claims that there is no Dana, there is only Zuul. The developers of XUL adopted this sentence slightly modified as There is no data, there is only XUL. and thus pointed to the unusual property of XUL as an XML language of not containing data or documents, but describing a user interface.

Further references to the film Ghostbusters can be on the XML - namespace - URI http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul read, which is located at the beginning of each XUL file. Keymasters and gatekeepers also refer to characters from the film here. If you call up the address in the web browser, the previously mentioned sentence There is no data, there is only XUL appears.

In Mozilla software there are not only references to "Ghostbusters" in XUL. Also Venkman , the JavaScript - debugger The project, named after a character in Ghostbusters.

Techniques with a similar concept

There are now other XML-based formats that describe a user interface, which means that the named XUL property is no longer so unusual today (see previous chapter):

See also




Web links


Mozilla Developer Center


Individual evidence

  1. Overlay extensions. Retrieved August 30, 2019 .
  2. Getting Started with JavaFX: Using FXML to Create a User Interface | JavaFX 2 Tutorials and Documentation. Retrieved January 26, 2018 .