Example Elections XML

Please use this page to find XML for previous live elections, as well as test data for previous and future tests.

Sets of test data are listed first – scroll down the page for the historical live XML from actual events.

New XML datasets will be added as and when they become available, which is usually very soon after a live test or a real election event.

Generally, you will find that each zip file contains both the nominations and results for one or more elections, as well as some ‘running total’ type messages such as ‘State of parties’.

IMPORTANT: When processing the XML, always use the nominations XML first to setup your system, in readiness to handle the results XML.

Remember that PA IDs for entities such as candidates and parties will be different in the test and live versions of polls where the data includes named candidates (fictional names in tests, actual names in live). See guidance at XML Format

Note that the messages transmitted during tests contain the word ‘Test’ in their filenames but of course the messages you can expect to receive for the actual elections do not.

Test data for the 2020 polls:

Test local council elections 2020

Click on the following links to download ZIPs of test messages for the May local council elections:

Test mayoral elections 2020

Click on the following links to download ZIPs of test messages for the May mayoral elections:

Test London Assembly elections 2020

Click on the following links to download ZIPs of test messages for the May London Assembly elections:

Test police commissioner elections 2020

Click on the following links to download ZIPs of test messages for the May police commissioner elections:

Test data for the 2019 polls:

Test Snap General Election 2019

Click on the following links to download ZIPs of test messages for the Snap General Election:

Test UK European Parliament elections 2019

Click on the following links to download ZIPs of test messages for the May 23 2019 Euro election in the UK:

Test Local Council elections 2019

Click on the following links to download ZIPs of test messages for the May 2 2019 local councils polls:

Test Mayoral elections 2019

Click on the following links to download ZIPs of test messages for the May 2 2019 Mayoral elections:

Test data for the 2018 polls:

Test Snap General Election 2018

Click on the following link to download a ZIP of test messages from the January 2018 test for a possible Snap General Election:

Test Local Council elections 2018

Click on the following links to download ZIPs of test messages for the May 2018 local councils polls:

Test Mayoral elections 2018

Click on the following links to download ZIPS of test messages for the 2018 Mayoral elections:

Test data for the 2017 polls:

Test General Election 2017

Click on the following links to download ZIPs of test messages for the 2017 General Election:

Test Local Council elections 2017

Click on the following links to download ZIPs of test messages for the 2017 local councils polls:

Test Mayoral elections 2017

Click on the following links to download ZIPS of test messages for the Mayoral elections:

Test Northern Ireland elections 2017

Click on the following links to download ZIPs of test messages for the Northern Ireland election:

Test data for the 2016 polls:

Test EU Referendum 2016

Click on the following links to download ZIPs of test messages for the EU in-out referendum:

Test Local Council elections 2016

Click on the following links to download ZIPs of test messages for the 2016 local councils polls.

Test London, Welsh Assembly and Scottish Parliament elections 2016

Click on the following links to download ZIPs of test messages for the London Assembly, Welsh Assembly and Scottish Parliament elections:

Test Mayoral elections 2016

Click on the following links to download ZIPS of test messages for the Mayoral elections:

Test Police elections 2016

Click on the following links to download ZIPS of test messages for the Police elections:

Test Northern Ireland elections 2016

Click on the following links to download ZIPs of test messages for the Northern Ireland election:

Historical live XML

Live elections 2021

Click on the following links to download ZIPs of nominations and results XML for the 2021 elections:

Live elections 2019

Click on the following links to download ZIPs of nominations and results XML for the 2019 elections:

Live elections 2018

Click on the following links to download ZIPs of nominations and results XML for the 2018 elections:

Live elections 2017

Click on the following links to download ZIPs of nominations and results XML for the 2017 elections:

Live elections 2016

Click on the following links to download ZIPs of nominations and results XML for the 2016 elections:

Please note that the following is historical data and might not be valid against the current schemas. Message sets are not necessarily as complete as on the night.

General Election 2015

Click here to download a ZIP file which contains XML nominations and results messages generated from the 2015 General Election.

Local Council elections 2015

Click here to download a ZIP of results messages for the 2015 local councils polls.

Mayoral elections 2015

Click here to download a ZIP of nominations and results messages for the 2015 mayoral elections.

European Parliament elections 2014

Click on the following links to download ZIPs of nominations and results messages for the British and Northern Ireland components of the 2014 European Parliament elections:

Other

Alternatively, click here to download a ZIP file, which contains a few other example historical test and real messages.