Skip to content

Candidate list

This document explains the XML structure and its relations to the classes in Java. Provided below are the relations explained and an example structure.

The section titles represent the XML class that it is referring to, below that you will find the representing Java class with a link to the file.

Example

<EML>
    <TransactionId>1</TransactionId>
    <ManagingAuthority>
        <AuthorityIdentifier Id="CSB">
            De Kiesraad
        </AuthorityIdentifier>
    </ManagingAuthority>
    <IssueDate>2021-02-09</IssueDate>

    <CandidateList>
        <Election>
<!--            Election information-->
            <ElectionIdentifier Id="TK2021">
                <ElectionName>Tweede Kamer der Staten-Generaal 2021</ElectionName>
                <ElectionCategory>TK</ElectionCategory>
                <kr:ElectionDate>2021-03-17</kr:ElectionDate>
            </ElectionIdentifier>

            <Contest>
<!--                Contest information-->
                <ContestIdentifier Id="9">
                    <ContestName>Amsterdam</ContestName>
                </ContestIdentifier>

<!--                Affiliation (Election party) is an array (multiple parties in the document)-->
                <Affiliation>
<!--                    Election party information-->
                    <AffiliationIdentifier Id="1">
                        <RegisteredName>VVD</RegisteredName>
                    </AffiliationIdentifier>

<!--                    List meta-data-->
                    <kr:ListData 
                            BelongsToSet="1" 
                            PublicationLanguage="nl" 
                            PublishGender="true">
                    </kr:ListData>

<!--                    Candidate information-->
                    <Candidate>
                        <CandidateIdentifier Id="1">
                        </CandidateIdentifier>
                        <CandidateFullName>
                            <xnl:PersonName>
                                <xnl:NameLine NameType="Initials">M.</xnl:NameLine>
                                <xnl:FirstName>Mark</xnl:FirstName>
                                <xnl:LastName>Rutte</xnl:LastName>
                            </xnl:PersonName>
                        </CandidateFullName>
                        <Gender>male</Gender>
                        <QualifyingAddress>
                            <xal:Locality>
                                <xal:LocalityName>'s-Gravenhage</xal:LocalityName>
                            </xal:Locality>
                        </QualifyingAddress>
                    </Candidate>
                </Affiliation>
            </Contest>
        </Election>
    </CandidateList>
</EML>

EML

XML Example
<EML>
    <TransactionId>1</TransactionId>
    <IssueDate>2021-02-09</IssueDate>
</EML>

Class used: CandidateList

The TransactionId and IssueDate are used for this class.
Note: The Election, Contest and ManagingAuthority properties from this class come from other classes listed below.

Data field Class field
TransactionId [Value] transactionId [Property]
IssueDate [Value] issueDate [Property]

ManagingAuthority

XML Example
<ManagingAuthority>
    <AuthorityIdentifier Id="CSB">
        De Kiesraad
    </AuthorityIdentifier>
</ManagingAuthority>

Class used: ManagingAuthority

The Id and AuthorityIdentifier text are used for this class.

Data field Class field
Id [Attribute] id [Property]
AuthorityIdentifier [Value] name [Property]

ElectionIdentifier

XML Example
<ElectionIdentifier Id="TK2021">
    <ElectionName>Tweede Kamer der Staten-Generaal 2021</ElectionName>
    <ElectionCategory>TK</ElectionCategory>
    <kr:ElectionDate>2021-03-17</kr:ElectionDate>
</ElectionIdentifier>

Class used: Election

The Id, ElectionName, ElectionCategory and ElectionDate are used for this class.

Data field Class field
Id [Attribute] id [Property]
ElectionName [Value] name [Property]
ElectionCategory [Value] category [Property]
ElectionDate [Value] electionDate [Property]

ContestIdentifier

XML Example
<ContestIdentifier Id="9">
    <ContestName>Amsterdam</ContestName>
</ContestIdentifier>

Class used: Contest

The Id and ContestName are used for this class.
Note: The parties property from this class come from other classes listed below.

Data field Class field
Id [Attribute] id [Property]
ContestName [Value] name [Property]

Affiliation

XML Example
<Affiliation>
    <!-- Election party information-->
    <AffiliationIdentifier Id="1">
        <RegisteredName>VVD</RegisteredName>
    </AffiliationIdentifier>

    <!-- List meta-data-->
    <kr:ListData 
            BelongsToSet="1" 
            PublicationLanguage="nl" 
            PublishGender="true">
    </kr:ListData>
</Affiliation>

Class used: ElectionParty

The AffiliationIdentifier, RegisteredName and ListData are used for this class.
Note: The candidates property from this class come from other classes listed below.

Data field Class field
AffiliationIdentifier#Id [Attribute] id [Property]
RegisteredName [Value] name [Property]
ListData#PublicationLanguage [Attribute] publicationLanguage [Property]
ListData#PublishGender [Attribute] genderPublished [Property]

Candidate

XML Example
<Candidate>
    <CandidateIdentifier Id="1">
    </CandidateIdentifier>
    <CandidateFullName>
        <xnl:PersonName>
            <xnl:NameLine NameType="Initials">M.</xnl:NameLine>
            <xnl:FirstName>Mark</xnl:FirstName>
            <xnl:LastName>Rutte</xnl:LastName>
        </xnl:PersonName>
    </CandidateFullName>
    <Gender>male</Gender>
    <QualifyingAddress>
        <xal:Locality>
            <xal:LocalityName>'s-Gravenhage</xal:LocalityName>
        </xal:Locality>
    </QualifyingAddress>
</Candidate>

Class used: Candidate

The CandidateIdentifier, NameLine, FirstName, Prefix, LastName, Gender and LocalityName are used for this class.
Note: the prefix field is ONLY available when the candidate has one.

Data field Class field
CandidateIdentifier#Id [Attribute] id [Property]
NameLine [Value] initials [Property]
FirstName [Value] firstName [Property]
Prefix [Value] prefix [Property]
LastName [Value] lastName [Property]
Gender [Value] gender [Property]
LocalityName [Value] location [Property]