Since WarpIN 0.9.6, WarpIN scripts are XML-compliant. If you don't know what XML is, this section is supposed to give you a short introduction.

XML stands for "eXtensible Markup Language". If you know HTML, XML will look very similar at first. It uses a similar syntax for its tags (they are now called elements) in angle brackets, elements can have attributes, and so forth.

If you don't know HTML, let's just say that XML is a way to structure documents. XML documents are plain text files, but they contain special "commands", which are called elements. Per definition, everything in XML which is in angle brackets (e.g. <COMMAND>) is considered an element.

In addition, XML can group data by introducing opening and closing elements. The closing tag looks like the opening tag, except that it starts with a slash. For example, provided that the element for "bold text" is "B", you can enclose a piece of bold text like this: <B>Bold text.</B>

Compared to HTML, XML is both stricter and more flexible though.

It is stricter because it enforces stricter syntax rules to get rid of the present chaos in HTML syntax. Compared to HTML, XML imposes the following requirements, for example:

On the other hand, XML is much more flexible than HTML because you can define the elements yourself. This is done with a "Document Type Definition" (DTD) which declares which elements and attributes may be used in which context. The DTD can either be in the document itself or in an external file, usually with a .dtd extension. (The syntax for DTDs is different from that of the actual XML document, and we're not going into that here.)

As a result, while HTML can only display text in a predefined way, XML documents can contain anything. You can use them for texts, for databases, for spreadsheets, or whatever. To be precise, that's the exact purpose of XML: define an infrastructure for any type of document.

Here's a sample XML document for a bibliography. With XML, there can be only one "root" element, which, in this case, we define to be <bibliography>. (That's similar to the HTML tag in HTML.) Each book in the bibliography will be in a <book> element, which in turn contains the <author> and <title> elements with the actual data.

<?xml version="1.0"?>
<bibliography>
<book>
    <author>Ulrich M”ller<author>
    <title>WarpIN Programmer's Guide and Reference</title>
</book>
<book>
    <author>Ulrich M”ller<author>
    <title>WarpIN User's Guide and Reference</title>
</book>
</bibliography>
The first line is required for any XML document and defines the XML version (1.0 is the only one at this point) and some other stuff which we are not describing here.

As you might imagine, an "XML document" by itself is not very helpful. Since an XML document can contain any data in any structure, as long as the XML syntax rules are obeyed, it is XML-compliant. To be precise, XML isn't even really a language -- it's more of a "meta-language" which sets rules of how to define a certain document type. How the data is understood however depends on the application that reads the data.

Enter WarpIN. The script language described in this book is XML-compliant, but only WarpIN will react to WarpIN scripts the way you expect it to (that is, display pages, extract archives, and so on). On the other hand, WarpIN will refuse to accept XML files which do not obey the WarpIN conventions.

Being XML-compliant however has the advantage that any XML parser can read a WarpIN script, and even if it won't install an archive then, it can display the data. For example, you can feed a WarpIN script into Mozilla (which has a built-in XML parser), and Mozilla will show you the script and can report errors in the XML syntax. Even better, since the WarpIN DTD is available in a separate file, Mozilla can even check the correct ordering of elements in your WarpIN scripts.