Cain files store the models, methods, simulation output, and random number states. Below is the overall structure of a Cain file. The required elements are shown in black; the optional elements are colored grey.
<?xml version="1.0" encoding="utf-8"?>
<cain version="Number">
<listOfModels>
One or more <model> elements.
</listOfModels>
<listOfMethods>
One or more <method> elements.
</listOfMethods>
<listOfOutput>
One or more output elements.
</listOfOutput>
<random>
Zero or more <stateMT19937> elements.
</random>
</cain>
In the next few sections we will describe each of the top-level elements. Each element attribute has one of the following formats: