Welcome to the QuickBooks Community. It's essential you're able to get ahead with your T4s and I'll be glad to steer you on the right path.
In order to get started, you'd first need to make sure you're set up correctly so you can generate the XML file with ease. Here's how to get started:
Select Settings ⚙️ then Payroll Settings.
Select Federal Taxes on the Preferences page.
On the Company Federal Tax Information page, enter your CRA-assigned CRA Payroll Number and T4 Transmitter Number.
Select OK.
If you don't have a T4 Transmitter number, contact the CRA. You may be able to simply use 555555.
Once your account is set up, you can easily export XML files by following a few quick steps:
From the left menu select Employees and then Payroll Tax.
Select Annual Forms under the Forms section.
Select T4 slip (employer).
Choose the period and select View. The T4 summary (employer) opens in a new tab. (Note: It's a good idea to print or save a copy for your records.)
Go back to QuickBooks Online in the previous tab and select Submit. This will export your T4 slips as an XML file and automatically archive a copy for your records in QuickBooks Online.