XML format

General Information

What is XML?

XML is the international technology standard being used for transfers of data. This technology improves the quality of the data filed and makes it easier for our clients and the Canada Revenue Agency (CRA) to make programming changes mandated by new legislation.

Download the XML schema from our website and use it to check that the format of your XML document is correct before you send it to the CRA. The schema is used with your parser to validate your file. Your parser should be a validating parser that checks for the proper file format. You should verify that the validating feature in your parser is turned on before you check your file.

Testing of an XML document

The CRA will not offer a test service for submissions filed in XML format. You must test your submission before you send it to the CRA. You can self-test your submissions by using the XML schema that you download from our website. 

The Registered Plans Directorate will reject submissions with file format errors, and all of the listings within those submissions will be considered not filed.

XML example

The XML format uses open and closed tags to hold the reported data. The following example shows the tag syntax. The tag names and constraints are defined in the schema.

Example: Last name = "Smith"
Format is <annuitantLastName>Smith</annuitantLastName>

Click here to view an example in XML format (2KB) of complete xml files with only two contracts in the listings. This document is both valid and properly formatted and is validated by pointing to the actual schema located on our website.

Report a problem or mistake on this page
Please select all that apply:

Thank you for your help!

You will not receive a reply. For enquiries, contact us.

Date modified: