<?xml version="1.0" encoding="utf-8"?>

<!--root element-->
<responses xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="response.xsd">
    <!--
        - element response represents response from respondent
        - it must contain survey ID and questions at all times
    -->
    <response>
        <!--
            - this element has the value of survey ID from survey.xml
            - only non-negative integer is permitted
        -->
        <surveyId>1</surveyId>
        <!--
            - questions is a set of questions with AT LEAST ONE selected answer
            - if there was no selected answer for question it is not present
        -->
        <questions>
            <!--
                - question element represents question with at least one selected answer
                - must contain question ID and set of answers
                - question ID is unique inside response
            -->
            <question>
                <!--
                    - this element has the value of question ID from survey.xml
                    - only non-negative integer is permitted
                -->
                <questionId>1</questionId>
                <!--
                    - answers represents set of selected answers in question
                    - must contain at least one ID
                -->
                <answers>
                    <!--
                        - this element has the value of answer ID from survey.xml
                        - only non-negative integer is permitted
                    -->
                    <answerId>1</answerId>
                </answers>
            </question>
            <question>
                <questionId>2</questionId>
                <answers>
                    <answerId>1</answerId>
                    <answerId>3</answerId>
                    <answerId>4</answerId>
                </answers>
            </question>
        </questions>
    </response>
    <response>
        <surveyId>2</surveyId>
        <questions>
            <question>
                <questionId>1</questionId>
                <answers>
                    <answerId>1</answerId>
                </answers>
            </question>
            <question>
                <questionId>2</questionId>
                <answers>
                    <answerId>3</answerId>
                </answers>
            </question>
        </questions>
    </response>
</responses>
