QMML Documentation 

QMML: An Introduction
QMML stands for Question Mark Markup Language. It is pronounced as "Quimmel".

QMML was internally created as part of a specific project for the Ubuntu Linux distribution, but we decided to release it as a standalone markup language.

QMML is somewhat like other markup languages, but it has a greater emphasis on storing very large amounts of information for other programs to use.

A QMML file looks something like the following example:

?Album?album1 ?*Album?

?Title?name2 ?*Artist?


In QMML, there are two types of tags. A QMML tag is a word surrounded in a pair of question marks.(?) Inside a QMML tag is some kind of stored information.

Currently, QMML supports 2 types of tags: Objects and properties.

An Object is a tag which contains other tags known as properties.
In the example above, each ?Song? tag was a separate object.

Objects begin with:

Have properties inside them:

and always end with:
(Note the asterisk)

Now, properties are defined inside of objects. Some of the properties defined in the example were "?Artist?" and "?Title?". Properties are defined in the following way:

Any object can have any number of properties that can be referenced, regardless of the properties other objects have.

In this way, one can store a massively large database of objects with properties, as may be needed in several applications.

The Python Bindings

Currently, there are only python bindings for QMML.

There are two simple, easy to understand commands used to control the python bindings.

First off, you should go and download our python bindings. The file qmml.py should be put in the same directory as your project and python folder.
To use QMML in your Python application, start with the import command:
import qmml

The first command to control your qmml database is the search command. This command finds all values of a certain property in your qmml file and outputs them to a textfile.
So, you can call the search function with:
qmml.search(propertyName, filePath)

Where propertyName is the specific property you want to retrieve, and filePath is the path to your .qmml file.
So, to collect a list of all of the Song titles in our example above, you would run:
qmml.search(Title, example.qmml)

And, your output would be in the text file qmml automatically created called titles. The output would look like:

The other qmml command is the give command. The give command gives back an exact property of an exact object. You call the give function with:
qmml.give(ObjectName, PropertyName,filePath)

Where ObjectName is the name of the object you wish to obtain a property from, PropertyName is the name of the property you want to obtain, and filePath is the path to your .qmml file.
So, referring to our example, to obtain the album name of Song3, you would run:
qmml.give(Song3, Album, example.qmml)
nameQMML would then send the output to the automatically created file: Song3Album.
The output would look like:

Extending the Python Bindings
Although the Python Bindings currently have a limited number of commands, it is extremely easy to extend them, as the code is relatively simple, easy to understand, extremely short, and it does not need to be compiled or installed.
To add a command to the python bindings, simply create a new function in the "qmml.py" file.

Writing your own Bindings

QMML could effectively be translated to work with almost any language. We are currently adding to the Python bindings and working on Ruby bindings, but we'd love some help. Don't be afraid to comment in the forums, or contribute your own work!