In order to avoid “Parser was expecting element” error in data loader, kindly check the following settings in Apex Data Loader
1. Check whether you have given the proxy correctly.
2. Check whether you have given the port number correctly.
3. Check whether you have given the correct url(for Production – https://login.salesforce.com and for Sandbox – https://test.salesforce.com).
4. Make sure “API Enabled” permission is checked on the Profile.
Cheers!!!