OpenTrivia

TriviaML

All questions are saved in TriviaML, which is an open, standardized XML format.

Here is a small sample:

<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE triviaml SYSTEM "triviaml.dtd">
<triviaml title="Movie Trivia"
        author="Philipp Lenssen">

    <trivia>
        <question>Who's portrayed here</question>
        <answer>Al Pacino</answer>
        <hint>Starred in "Heat"</hint>
        <image>al_pacino.gif</image>
    </trivia>

    <trivia>
        <question>Who directed "Nosferatu"</question>
        <answer>[F.W.] Murnau</answer>
    </trivia>

</triviaml>

There could be many implementations to make use of this TriviaML document. TriviaML doesn't know any of the implementation details but seperates into two different types (This value is included in the root-element "type" attribute):

Root Attributes

The following optional attributes are possible in the root element:

Name Explanation Example
title The title of the Trivia set Academy Award Winners
author The author of the Trivia set Philipp Lenssen
email The email of the author of the Trivia set info@opentrivia.com
homepage The homepage of the author of the Trivia set http://opentrivia.com
date The (ISO) date when this Trivia set was last updated 2002-12-24
category The category of this trivia set. Please refer to the Categories entertainment/ movie/ awards/ oscar
type As explained above: if the type of Trivia is intended as free-text or multiple-choice multiple-choice

Trivia element

Each set of TriviaML can include an unlimited number of "trivia"-elements. Each trivia-element includes the following:

Node name Explanation Example data Quantity
question The question to be asked the player. Question mark is optional Who directed "City Lights" One
answer The question to be asked the player. The Question mark is optional Charl[y|ie] Chaplin One or more
hint A hint to be given to the player (in case a hint is requested) Middle name is "Spencer" None or more
image File path of image to be displayed al_pacino.gif One or none
music File path of music to be played german_anthem.mid One or none

Note: Many details of how the TriviaML file is made us of are dependent on the implementation. (The implementation provided on this site is just one of many possible ones.) For example, without you explicitly providing a hint, this site's implementation of a TriviaML game creates a hint by giving the player some starting letters of the solution.

Answer syntax: There are already many ways that can be provided by the implementation to make sure your answer matches a well-intended player answer. Additionally, you can use the following syntax (here to the question, Who directed "City Lights"):
Charly Chaplin
or Charly [Spencer] Chaplin
or Charl[y|ie|es] [|Spencer|S.] Chaplin

As you can see, everything enclosed in square brackets is an option, and multiple options are seperated by "|".

Movie & TV
Literature
Geography
History
Sport & Fun
Comics
Computers
Science
Music
Fine Arts
Misc.
Make a donation