What is a good general purpose plain text data format like that used for Bibtex? Context
I'm writing a few multiple choice practice questions and I'd like to store them in a simple plain text data format. I've previously used tab delimited, but that makes editing in a text editor a bit awkward. I'd like to use a format a bit like bibtex.
E.g., 
@Article{journals/aim/Sloman99,
  title =   "Review of Affective Computing",
  author =  "Aaron Sloman",
  journal = "AI Magazine",
  year =    "1999",
  number =  "1",
  volume =  "20",
  url = "http://dblp.uni-trier.de/db/journals/aim/aim20.html#Sloman99",
  pages =   "127--133",
}

Important properties seem to be:


*

*Data is made up of records

*Each record has multiple attribute-value pairs

*Each attribute-value pair can be recorded on a new line, but can span multiple lines

*Easy to manually enter textual data in a text editor

*Readily available tools to convert into tabular data


For example, here is something a bit like what might work
@
id: 1
question: 1 + 1
a: 1
b: 2
c: 3
d: 4
correct: b

@
id: 2
question: What is the capital city of the country renowned for koalas, 
          emus, and kangaroos?
a: Canberra
b: Melbourne
c: Sydney
d: Australia
correct: a

While I'm interested in the specific context of writing multiple choice questions, I'm also interested in the broader issue of representing data in this or a similar type of format.
Initial Thoughts
My initial thoughts included the following:


*

*YAML

*JSON

*Delimited data with custom field and record delimiters that permit multi-line records

*A custom file format with some form of custom parser


I've only had a quick look at YAML and JSON; My first impressions are that they might be over-kill. Custom delimiting might be good, but it would probably require all fields to be present in a consistent order for all records. Writing my own parser sounds a bit fiddly.
 A: I'd go with YAML. Straight forward to edit and has plenty parsers in different languages:
---
- 
  question: 1 + 1
  incorrect:
    - 1
    - 3
    - 4
  correct: 2
-
 question: What is the capital city of the country renowned for koalas, emus, and kangaroos?
 incorrect:
   - Melbourne
   - Sydney
   - Australia
 correct: Canberra

You could then write a little script to randomly mix the incorrect with correct answers and output the LaTeX suggested in DQdlM's answer.
EDIT: This ruby script:
require 'yaml'

questions = YAML.load(File.read(ARGV.first))
questions.each_with_index do |question,index|
  answers = question['incorrect'].map{|i| '    \choice ' + i.to_s }
  answers << '    \CorrectChoice ' + question['correct'].to_s

  output = ["\\question{#{index + 1}}"]
  output << question['question']
  output << "  \\begin{choices}"
  output << answers.sort_by{rand}
  output << "  \\end{choices}"
  output << "\n"

  puts output.flatten.join("\n")
end

Will produce the following output
\question{1}
1 + 1
  \begin{choices}
    \choice 4
    \choice 1
    \choice 3
    \CorrectChoice 2
  \end{choices}

\question{2}
What is the capital city of the country renowned for koalas, emus, and kangaroos?
  \begin{choices}
    \choice Melbourne
    \choice Sydney
    \CorrectChoice Canberra
    \choice Australia
  \end{choices}

A: This may not fully address applications beyond your multiple choice questions but there is an exam class available for LaTeX.
Multiple choice questions are formed like this:
\question[2]
The fascile of a nerve is surrounded by what connective tissue layer?
  \begin{choices}
    \choice endoneurium
    \choice epineurium
    \CorrectChoice perineruium
    \choice neurolemma
    \choice none of the above
  \end{choices}

By including \printanswers in your preamble it highlights the correct answer.
A: Org Mode can do that.  One way would be like this:
#+COLUMNS: %id %a %b %c %d %correct

* 1 + 1  
    :PROPERTIES:
    :id:       1
    :a:        1
    :b:        2
    :c:        3
    :d:        4
    :correct:  b
    :END:

* What is the capital city of the country renowned for koalas, emus, and kangaroos?
    :PROPERTIES:
    :id:       2
    :a:        Canberra
    :b:        Melbourne
    :c:        Sydney
    :d:        Australia
    :correct:  a
    :END:

If you'd like to visually inspect a quick summary table then insert the following
* The column view

  #+BEGIN: columnview :hlines 1 :id global

  #+END:

Put the cursor in the #+BEGIN block and do C-c C-x C-u to get
#+BEGIN: columnview :hlines 1 :id global
| id | a        | b         | c      | d         | correct |
|----+----------+-----------+--------+-----------+---------|
|  1 | 1        | 2         | 3      | 4         | b       |
|  2 | Canberra | Melbourne | Sydney | Australia | a       |
|    |          |           |        |           |         |
#+END:

and if you'd like to import (to R, for instance) then insert a table name like this:
#+BEGIN: columnview :hlines 1 :id global
#+tblname: simpleDF
| id | a        | b         | c      | d         | correct |
|----+----------+-----------+--------+-----------+---------|
|  1 | 1        | 2         | 3      | 4         | b       |
|  2 | Canberra | Melbourne | Sydney | Australia | a       |
#+END:

then insert and execute the following R code block with C-c C-c:
#+begin_src R :session *R* :var df=simpleDF :colnames yes
head(df)
#+end_src

this gives
#+results:
| id | a        | b         | c      | d         | correct |
|----+----------+-----------+--------+-----------+---------|
|  1 | 1        | 2         | 3      | 4         | b       |
|  2 | Canberra | Melbourne | Sydney | Australia | a       |

The good news is that the data frame df is now stored in the active *R* session and is available to post-process however you like.  All of this being said, if it were me, I would probably start with the exams package (in R) for the specific application of storing/writing multiple choice questions, though that YAML example looks really cool.
A: Here are a couple of additional ideas:


*

*Use R itself:
exam = list(question1 = list(
                        question='Here is the first question',
                        answers = list('a' = 'Here is the first answer',
                                       'b' = 'here is the second answer',
                                       'c' = 'Here is the third answer'
                                       )
                             )
           )

> exam$question1
> exam$question1$question
> exam$question1$answers
> exam$question1$answers$a


*Use reStructuredText, which is a lightweight markup language, similar to markdown, that can be parsed into a DOM (Python), e.g.:
Here is the first question.

* First answer.
* Second answer.
* Third answer.

There is an rst2xml writer that converts the above to:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd">
  <!-- Generated by Docutils 0.7 -->
  <document source="tmp.rst">
    <paragraph>Here is the first question.</paragraph>
    <bullet_list bullet="*">
      <list_item>
        <paragraph>First answer.</paragraph>
      </list_item>
      <list_item>
        <paragraph>Second answer.</paragraph>
      </list_item>
      <list_item>
        <paragraph>Third answer.</paragraph>
      </list_item>
    </bullet_list>
  </document>

There is also an rst2latex writer, so your test can be easily formatted for printing, and you can deal with the data using python and the document object model.
The advantage of this option is that rst is easy to read and write, unlike XML, but your data is still structured for use in R, Python, etc.
A: Why not use XML? There are many good parsers that directly translate XML files to data structures, even one for R ( http://cran.r-project.org/web/packages/XML/index.html ).
The format looks like this (example taken from http://www.w3schools.com/xml/default.asp ). 

<?xml version="1.0"?>
<notes>
    <note>
        <to>Tove</to>
        <from>Jani</from>
        <heading>Reminder</heading>
        <body>Don't forget me this weekend!</body>
    </note>
    <note>
        <to>Janis</to>
        <from>Cardinal</from>
        <heading>Reminder</heading>
        <body>Don't forget me the next weekend!</body>
    </note>
</notes>

E.g, using the XML package:
z=xmlTreeParse("test.xml")
z$doc$children$notes

gives access to the complete notes body,
z$doc$children$notes[1]

is just the first node and so on...
