Bad file:Element {http://soap.sforce.com/2006/04/metadata} invalid at this location

Bad file:Element {http://soap.sforce.com/2006/04/metadata} invalid at this location

Bad file:Element {http://soap.sforce.com/2006/04/metadata} invalid at this location error occurs due to the following

1. Formatting in package.xml is incorrect.

2. Formatting in destrcutivechanges.xml is incorrect.

Check whether some white space is present in the file. Double check the name attribute in all types in both package.xml and destructivechanges.xml.

Leave a Reply